AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 dropdownlist
Posted by swapna on  2/4/2008 5:32:00 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
hi,
if a catogary is selected ina drop down then the detail related to selected catagory should be displayed in the next dropdown and the information retrieved should not be shown in dropdown repeatedly.

Post Your Reply Post New Question

 Viewer's Reply
Clear the dropdown before you load it.
Answered By Moderator1 on 2/5/2008 7:06:57 PM
Hi,

As per your question, you are doing a category and subcategory like module. So when you select a category then its corresponding category should be selected in the next dropdown. If i'm right,

In the selectedIndexchanged event of the category dropdown, clear the items of the subcategory dropdown control before you load the subcateogry values.

DropDownList2.Items.Clear();

Thanks
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
Many .NET teams are underperforming, is yours?