473,748 Members | 5,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Customize Option Group List

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?
Jun 28 '07 #1
1 1572
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)
Giles Papworth wrote:
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?
Jun 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1751
by: Chris Kilmer | last post by:
I would like to be able to customize the path structure that VS.NET 2003 creates for projects. 1. I'd like to be able to create a project without VS.NET creating a folder for that project. I've already created a folder where I want the project to go, however, VS.NET won't use the existing folder, it wants to create it's own. 2. I also want to be able to specify my own paths for source, builds, etc.
3
15619
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing only <option> tags is fairly easy and there is plenty of material on the net to assist with this. However, I have searched long and found the material on the subject of <optgroup> to be sparse, with a few posts here & there, but basically you're...
2
3561
by: Omey Samaroo | last post by:
I have had many questions answered in this forum and I am trusting that one of the readers may help me find a simple solution. (1) Using a field called Date_Hired (type: Date/Time), how do I use a label to display a value that checks the current date, Date() and minus it from the date hired to show tenure displayed as Years Months Weeks and days ? (2) How do I use multiple option buttons with only one selected and if so it stores a...
6
2700
by: Robert | last post by:
Hello. I have been trying out the Lebans ToolTip Classes at http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at http://www.lebans.com/DownloadFiles/A2kTooltip.zip So far the classes work perfectly, except that now I need to extend it to support other controls besides the ones given in the example form. I have gotten it to work with some controls, but not others. I...
14
759
by: deko | last post by:
The below code dials a phone number when the subform datasheet cell containing the number is double clicked. The problem is that the dialer application (c:\windows\dialer.exe) pops up windows on the screen, requiring user intervention to click "Talk" or "Hang Up". I want to customize the behavior of the application so that no pop ups are received and the application drops the line automatically and closes itself in 6 seconds - which is...
5
14848
by: | last post by:
Hi guys, I have a form that I am using option groups on.. how can i make each option group a multi select ? thanks, kevin
1
3881
by: hackerslacker | last post by:
I have an ordering form that use two combo boxes to filter down the records of a Products table. This worked fine with the after_Update of the first filtering the records and creating the rowsource of the second combo. The second combo's control source is the Product ID field (foriegn key) on the Orders table. Everything worked well until I decided to enhance the form by changing the second combo to an option group. Now I don't know...
2
1328
by: brakai295 | last post by:
Hi there, I need someone to customise an autocompletion AJAX script a little bit. This free script here (demo | info & download) offers you auto-completion when typing in a country's name. I need the following changes: Functionality on a textarea rather than a textfield (shouldn't be a big thing)
5
1398
by: DLN | last post by:
Getting rid of the Customize option. I want to get rid of the {Right-Click}-{Customize} option on the tool bars. I’ve been able to get rid of all the other options but not Customize itself. The reason is the way the DB was originally built anyone can get to the database window and make modifications to the forms or delete tables or whatever. So now I need to lock it down, under the constraints that I’m working with no Database security...
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.