"Attached" Labels for TextBoxes, etc.?

G

Guest

Hi. Before I go and build my own Control for this (something I'd really
rather not do), I wanted to know if ASP.NET 2.0 has any built-in
functionality for effective "attaching" a label to a TextBox, DropDown List,
etc. in much the same way that it has been implemented in the CheckBox and
RadioButton control. I really hate having to build a big form with lots of
controls on it and then having to move a TextBox and the Label associated
with that TextBox separately as I redesign the form.

Ideas? Or am I going to have to create my own control for this?

Alex
 
S

Steven Cheng[MSFT]

Hi Alex,

Thank you for posting.

As for the "Attached Labels" you mentioned, I'm afraid the current ASP.NET
built-in control collection hasn't include such a server control. Also, I
agree with you that it's better to create a encapsulated custom control if
there're many web pages or applications that will utitlize such UI
functionality.

BTW, for custom control, are you going to create a custom web usercontrol
(ascx) or webserver control? Generally, ascx usercontrol is more convenient
but has less flexibilty comparing to web server control.

Anyway, if you have any further questions or anything we can help on
developing custom ASP.NET control, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hi Alex,

Just exploring the ASP.NET dev center and found the following new tech
article about developing rich design-time enabled customn control, and it
provide a "LabelBox" control which is something like what you want:

#A Crash Course on ASP.NET Control Development: Design-Time Features and
Capabilities
http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/ht
ml/CCCDesign.asp

Hope you enjoy it.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top