Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone

I'm fairly new to web development and LINQ... Can anyone please help me with the following?

I have a search page with two dropdownlists. First dropdownlist contains Categories, second dropdownlist contains CompanyName. Dropdownlists are already databound(LINQ) to Categories Table and CompanyName Table respectively. (The dropdownlists are filled with the correct data from sql database when page is displayed). I would like to display the CompanyName in the selected Category(from first dropdown) in the second dropdown. When user selects CompanyName, I want to display the CompanyDetails on the SearchResults page in a DataList.:confused:

Thanking you in advance.
Posted

1 solution

When user selects the first drop down ie, in the selected index changed event of first drop down fill the second drop down with the company names.You can use DataValueField of first dropdown to fill the second dropdown.When the user selects the company name, pass company Id as query string to the second page and use that query string to fill the datalist in the second page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900