Home All Groups Group Topic Archive Search About

"Attached" Labels for TextBoxes, etc.?

Author
17 May 2006 5:15 PM
Alex Maghen
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

Author
18 May 2006 6:41 AM
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.)
Are all your drivers up to date? click for free checkup

Author
19 May 2006 3:44 AM
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.)

Bookmark and Share