•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 403,039 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,885 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 979 | Replies: 13
![]() |
Its like following....
And so on....
<SELECT id="city" name="CITY" class=""> <option value="-1" SELECTED>Select</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Top Metropolitan Cities-----"></optgroup><option value="2">Ahmedabad</option> <option value="3">Bengaluru / Bangalore</option> <option value="4">Chandigarh</option> <option value="5">Chennai</option> <option value="6">Delhi</option> <option value="7">Gurgaon</option> <option value="8">Hyderabad / Secunderabad</option> <option value="9">Kolkata</option> <option value="10">Mumbai</option> <option value="11">Noida</option> <option value="12">Pune</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Andhra Pradesh-----"></optgroup><option value="14">Anantapur</option> <option value="15">Guntakal</option> <option value="16">Guntur</option> <option value="17">Hyderabad / Secunderabad</option> <option value="18">Kakinada</option> <option value="19">Kurnool</option> <option value="20">Nellore</option> <option value="21">Nizamabad</option> <option value="22">Rajahmundry</option> <option value="24">Tirupati</option> <option value="25">Vijayawada</option> <option value="26">Visakhapatnam</option> <option value="27">Warangal</option> <option value="28">Andhra Pradesh - Other</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Arunachal Pradesh-----"></optgroup><option value="30">Itanagar</option> <option value="31">Arunachal Pradesh - Other</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Assam-----"></optgroup><option value="33">Guwahati</option> <option value="34">Silchar</option> <option value="35">Assam - Other</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Bihar-----"></optgroup><option value="37">Bahgalpur</option> <option value="38">Patna</option> <option value="39">Bihar - Other</option> <option value="87">Jammu</option> <option value="88">Srinagar</option> <option value="89">Jammu and Kashmir - Other</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Jharkhand-----"></optgroup><option value="91">Bokaro</option> <option value="92">Dhanbad</option> <option value="93">Jamshedpur</option> <option value="94">Ranchi</option> <option value="95">Jharkhand - Other</option> <optgroup value="-1" STYLE="BACKGROUND:#D0E0F1;COLOR:#000" label="-----Karnataka-----"></optgroup><option value="97">Bengaluru / Bangalore</option> <option value="98">Belgaum</option> <option value="99">Bellary</option> <option value="100">Bidar</option> <option value="101">Dharwad</option> <option value="102">Gulbarga</option> <option value="103">Hubli</option> <option value="104">Kolar</option> <option value="105">Mangalore</option> <option value="106">Mysoru / Mysore</option> <option value="107">Karnataka - Other</option>
Last edited by sbv : Jun 3rd, 2008 at 1:14 am.
Just you need to group the items, Right!. Better you place more controls to differentiate them. For example:
Categories : load the group names into the categories DropDownlist
SubCategories (or) Items: load the items which is relevant to the category selecting above from dropdownlist at runtime.
Would you get me? and one more thing still i want to know exactly which control you are using?
I think you are in online, tell me asap
Categories : load the group names into the categories DropDownlist
SubCategories (or) Items: load the items which is relevant to the category selecting above from dropdownlist at runtime.
Would you get me? and one more thing still i want to know exactly which control you are using?
I think you are in online, tell me asap
If you got your answer, please mark the thread as Solved.
Thanks & Regards,
RajaRajan. R
rajarajan07@rediffmail.com
•
•
Join Date: Jun 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
hi 10x for rply.
i am using Asp.Net Dropdown list control.
The solution u provide may be good for solving my problem.
but i dont want that type of solution. i need same as the "optgroup" o/p.
Plz help anyone
Here is an implementation of a DropDownList and also of a ListBox:
http://www.codeplex.com/SharpPieces/
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
Other Threads in the ASP.NET Forum
- Previous Thread: link to cssfile which is stored in database
- Next Thread: How to get a datarow from a datable in C#?


Linear Mode