Click here to Skip to main content
15,881,852 members
Articles / Web Development / ASP.NET
Article

Label Text For ASP.NET projects

Rate me:
Please Sign up or sign in to vote.
2.35/5 (7 votes)
13 Jun 20041 min read 44.5K   823   18   1
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:

  1. simple : label near textbox
  2. 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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) Electronic Arts
Romania Romania
VB6(from VB3) addictive (MCP also) + ASP
Now trying C#
Database : SQL Server,DB2

Comments and Discussions

 
Generalfeature improvements Pin
mdissel20-Jan-05 10:50
mdissel20-Jan-05 10:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.