Data search through multiple dropdown list

  • Thread starter Thread starter tindatrue
  • Start date Start date
T

tindatrue

criteria
I want to make three dropdown list in my asp.net form
DDL 1 is Publisher
DDL 2 is Author
DDL 3 is Books
in first list user select publisher,second list automatically change depend
on what
publisher selected in first list,similarly third list change depend on first
and/or second list. after selection, user press search button, and extract
data from access
database and show result of selected search items from dropdown lists.

How to achieve this taks ? anyone can help ??

Thanks in advance for prompt reply
 
criteria
I want to make three dropdown list in my asp.net form
DDL 1 is Publisher
DDL 2 is Author
DDL 3 is Books
in first list user select publisher,second list automatically change depend
on what
publisher selected in first list,similarly third list change depend on first
and/or second list. after selection, user press search button, and extract
data from access
database and show result of selected search items from dropdown lists.

How to achieve this taks ? anyone can help ??

Thanks in advance for prompt reply

A regular way is to set AutoPostBack property to True
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.dropdownlist.aspx


<asp:DropDownList id="ColorList"
AutoPostBack="True"
OnSelectedIndexChanged="Selection_Change"
runat="server">

.......
void Selection_Change(Object sender, EventArgs e)
{

// Use ColorList.SelectedItem.Value to get the selected value
.....

DropDownList2.DataSource = ...
DropDownList2.DataBind();

}

and so on
 
Alexey thanks for your reply, I know about autopostback = true
but the problem is that all the list automatically posting back data
and i dont want thatm what i want is ,when user select all field
and press search button then the result will be shown

thanks
 
Alexey thanks for your reply, I know about autopostback = true
but the problem is that all the list automatically posting back data
and i dont want thatm what i want is ,when user select all field
and press search button then the result will be shown

thanks

ok then you have to use AJAX
 
Back
Top