List Controls and the OPTGROUP Tag

I've been trying to do this for days and have got nowhere, so i'm hoping that someone here might be able to help.

Basically I would like to define option groups in a DropDownList server control like you can with the <OPTGROUP> tag in HTML. To complicate things further, I would like to be able to does this programatically at runtime.
I have looked all over for a way to do this with no luck. If anyone knows how to do this, or even if anyone knows a reasonable alternative that would give similar results, then many thanks will be coming your way.
----------------
Mr Black
Mr Black
0
Mr
8/28/2002 11:56:37 AM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
916 Views

Similar Articles

[PageSpeed] 1

I am looking for the same ....
angiras
0
angiras
12/29/2003 11:00:50 AM
Reply:

Similar Artilces:

Controlling web control instances on Web Form
I have created a composite control, extending functionality of the Hidden Control. However, I would like to prevent the user from adding this control to the page multiple times. I only want one instance of the control on the Web Form. What setting in my project to I adjust to enable this functionality? I can not find it in any of the books that I have referenced. Is this a setting or is this code that has to be added to the inheriting class. Looks like there is no standard apporach. But I'd consider using static field to count number of created objects and throw exception if second object ...

Load Text box of one web form with selected list item of list box of another web form
one help please Problem is i have two web forms  1.  ForiegnkeyTest.aspx  2. foroginkeytable.aspx   step 1 1 ForiegnkeyTest.aspx one web form <head runat="server"><script language="javascript" type="text/javascript">   function popWin()   {         var confirmWin = null;      confirmWin = window.open('foroginkeytable.aspx','anycontent',   'width=455,height=435,status');   }  </script> &...

How to access a control on a web form from anoter web form
hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it possible to access lbl1 from form2, change its text permenantly? thanks.   refer: http://dotnetslackers.com/Community/blogs/haissam/archive/2007/11/26/ways-to-pass-data-between-webforms.aspxSSNPlease remember to click "Mark as Answer" on the post that helps you. MinaSamy: hi all I have this scenarios i have two web forms, one called form1 and the other called form2 form1 has a label with id "lbl1" is it p...

how to call controls of web control form in coding of other forms?
hello everyone i have one problem i have created one webcontrol shoppingcart in which there are two labels one of qty and other of amt which are initially enable =falsenow on other page(aspx page) i have one txtbox of qty as txtqty i want tat as soon as user enters qty txtqty and clicks on add cart button it shd be display d value in lblqty of web control shopping cart make sure i m using datalist on aspx page so give me suggestions on tat basis and my coding is in vb. plz give ur suggestions as fast as possible. Neeti what do you mean by webcontrol.... it this user control or normal ...

How to get the HREF value of the Anchor tag in a web page using the web browser control in vb.net
Hi Friends,               i have a webserver control in my application.i load the web browser control on a button click using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click                AxWebBrowser1.Navigate("http://www.rateitall.com/i-322335-.aspx", False) End sub once the page is loaded in the browser i want the <a> HREF value in that page.For example if that page has ...

move controls and other tools anywhere around the web form and add datagrid list items to a normal list box
how can i place control and other tools anywhere around the page? for some reason i cannot place and move any of my tools and controls anywhere i want them to be. my web form does not look nice. you know like in ms dreamweaver and vb.net, u can place text box,labels etc anywhere on the form, thats exactly what i want to be able to do. also how can i add items from a datagrid list to a normal list box using a button? the datagrid list is data bound. the examples that i have seen so far shows items that are built into the code and then added to the list but nothing for data binded control. any...

non .net form issue within a .net form tag
this may be a bad question... but I am adding a shopping cart to my asp.net website and it calls for the following code for the 'buy now' buttons: <form method="POST" action=http://www.cart.net/cart.aspx/CartName><input type="hidden" name="ID" value="IDName"><input type="hidden" name="Describe" value="IDName Description"><input type="hidden" name="Price" value="100.00"><input type="hidden" name="QtyMax" value="1"><input t...

.Net Windows Control in Web Form
Hi all,How can I use a .Net windows control in a web form? I use object tag but it doesn't work and displays empty.Thanks in advance cheers Hi, you can check this article out: Hosting a Windows Control in a Web Form. This shows only how to host the control. If you want interaction with the client you can do this by setting the correct CAS (Code Access Security) settings on the client pc. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. Thanks guys for your replycheers...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Persisting data in a web user control, which contains a list of other web user controls.
 Hi All, I have a control I've created, which can have a number of child controls - also user controls - stored as an ArrayList, which can be added wither a design time or programmatically.My problem is when I add to the list programmatically, it doesn't persist them. So if I add 3 child controls in step 1 of a wizard, with the aim that those three will be visible inside the parent in step 3, what happens is that the parent has no child controls and the item count is 0.Can anyone help? Thanks in advance.Code:Parent Control Markup: <%@ Control Language="C#" Auto...

how to get the list of all controls used in web form
hi i have a web page with some contorls like table, text box, label, panel etc. when my web page opens i want to know all the controls palced in the web page and their name/id. can any body tell me how to get the control details. thanks durga Every control has a Controls property that returns all the child controls. You can access all the controls on a page by iterating over the Page.Controls property and then these controls' child controls and so on.I could write a signature here, but who'd read it? Hopefully you are using VS, as I do not know how to do this in Web Mat...

Looping through controls in VB.Net Web Form
I need to disable every imagebutton. In VB6, I would have done it like this: 1 Dim iButton As ImageButton 2 For Each iButton In Me.Controls 3 iButton.Enabled = False 4 Next In .Net, I get a "Specified cast is not valid" errror on line 2. Using Page.controls in place of Me.Controls also produces the same error. So, I tried this (and multiple variations): 1 Dim ibControl As Object 2 For Each ibControl In Me.Controls 3 If TypeOf ibControl Is ImageButton Then 4 ...

VB.NET web form Image control SizeMode
The "PictureBox" control in VB.NET has a property called "SizeMode". This allows you to choose how the image will display in the picture box if it is not the same size as the picturebox. However the "image" control for a VB.NET web form (in an ASP.NET application) does not have such a property, instead all images seem to be set to "StretchImage". I want them to be set to "normal", how can I do this? I thought of building my own user control but this would be silly because there must be a simpler way....

Web resources about - List Controls and the OPTGROUP Tag - asp.net.web-forms

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Run-fests no more as bowlers take control in Adelaide
The extent to which batsmen struggled in Adelaide would have exceeded even the most pessimistic of forecasts.

‘Enough Is Enough’: Obama Demands More Gun Control After Colorado Shooting
President Obama again turned to gun control as a potential solution to the horrific act

Obama pushes for gun control after Colorado shooting
"This is not normal," president says after gunman fatally shoots three people, including police officer, at Planned Parenthood facility

Boldin: Gabbert 'heck of a quarterback, he's poised, under control'
Skip to main content CSN Bay Area Header links TV Listings Contact App Email Follow Bar RSN login or register Login Search form Search 43° Navigation ...

Democrats New Plan For Gun Control – A Secret Government Terrorist Watch List
They call it the "Denying Firearms and Explosives to Dangerous Terrorists Act of 2015"

The Legend of Zelda: Twilight Princess Wii U will likely support Wiimote and Nunchuk controls
Well this is interesting. Fans have been speculating as to the control schemes that will be supported in The Legend of Zelda: Twilight Princess ...

The UN Can't Solve Climate Change, But CO2 Controls Are Coming Anyway
Diplomats, activists and politicians from virtually every country in the world are gathering in Paris for the 21st annual UN climate conference. ...

Indonesia says pilot response to faulty rudder control caused AirAsia crash
Indonesia says pilot response to faulty rudder control caused AirAsia crash

Easy Power Supply Mod Takes Control
... supplies are great for the home hobbyist, featuring wide voltage range and current limiting for a low price. What’s not to love? The controls; ...

Resources last updated: 12/1/2015 3:12:00 PM