I have a simple question about filters. I have 4 dropdown lists which filter the data in my web application from MySQL database table. The first dropdown list is already selected showing only one project_id but the others drop down lists displays all the possible values from the database - this is what I made so far.
But I want to display only the data values for that particular project selected.
It's ASP.NET 4.0, C# behind and MySQL database used. Any help will be appreciated. Thanks
Filter the second dropdown datasource with selectedvalue of first dropdown control
see this article http://www.asp.net/data-access/tutorials/master-detail-filtering-with-two-dropdownlists-
check out following links for populating cascading drop down list.
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx
http://www.codeproject.com/KB/aspnet/CascadingDropDown.aspx
http://www.aspsnippets.com/Articles/Creating-Cascading-DropDownLists-in-ASP.Net.aspx
Code:
// Code behind protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // your code to bind the first drop downlist