5
Vote

FormLabel control

description

Sometime you want to show readonly data that is binded by the webform.
 
The text could be rendered into a span tag.
 
ps. this also means that the WebForm should handle readonly properties (with no setter)
 
(copied from the support forum)

comments

elHosed wrote Jan 31, 2008 at 3:51 AM

This is easily done just by using ViewData. Since a readonly property doesn't need to be validated, filled, etc, only "bound", ViewData makes sense as the way to handle this.

Just my take on it.

However, writing the control is very quick and dirty. If anyone wants, I can slam it together in 15 minutes and upload it here.