Label Text For ASP.NET projects






2.35/5 (7 votes)
Jun 14, 2004
1 min read

44787

824
An article on creating controls for ASP.NET
Introduction
This control tries to ease the work of having to each time put a text box and then near the text box a label for description. This control contains both controls and can output this code as:
- simple : label near textbox
- table : output tr, td as necessary for outputting in a table
Using the code
The application is easy to use . Just compile the source, add to toolbox, drag
on Web Form - and specify the template to use. Please pay attention to the TemplateToUse
property : this
property decides which of the forms the control is displayed at. Also, for the
moment, you must call DataBind
method in order to see the caption
and the text ( this I think that I will solve in the next version ...)
Points of Interest
It is interesting only how the control displays on the Web Form on IDE. For
this, please look at the code in the DisplayLabelTextDesigner
History
- First version.
Future Improvements
- Add support for CSSClass for table, tr and td , textboxes and label.
- Do not need to call
DataBind
- Add rows property for multiline textboxes
- Add comments ( ;-) )
- Read about the strong name and see what features has for controls.