Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Customize Option Group List

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Giles Papworth - 28 Jun 2007 09:40 GMT
have an asp.net option group list.
I need to be able to style it or at least override the render event so i can
put in my own styles. Short of developing an inherited control of the option
group im not sure what else i can do.
I suppose the best way of explaining what i want to try and do is like this:

The option group list is rendered (when in flow layout) is rendered like this:
<span id="rbStatus">
     <label for="rbStatus_0">Employed</label>
     <input id="rbStatus_0" type="radio" name="rbStatus" value="1"
tabindex="1000" />
     <br>
     <label>

and so on and so forth. I need to change it so that it renders as:

<div id="rbStatus">
     <div for="rbStatus_0">Employed</label>
     <input id="rbStatus_0" type="radio" name="rbStatus" value="1"
tabindex="1000" />
     <br>
     <label>

or something to that effect. Does anyone have any idea how i can go about
this?
bruce barker - 28 Jun 2007 16:49 GMT
not sure what you are trying to do. it looks like you want to change the
span to a div. the only difference is the span is inline by default and
the div is block. you could change the span to a block element with css
(set the controls class), not need to make any changes to the control.

it looked like you might have wanted to change the label to a div. this
is bad idea. all input controls should have a <label> (not to be
confused with the asp:label, which is just a span). for check/radio
inputs, the label text is clickable. also when the using a page reader
(say for the blind) is used, it knows the label goes with the control.
see the Web Accessibility guidelines.

-- bruce (sqlwork.com)

>  have an asp.net option group list.
> I need to be able to style it or at least override the render event so i can
[quoted text clipped - 21 lines]
> or something to that effect. Does anyone have any idea how i can go about
> this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.