141ANG
asked on
Web Page Design Connected Drop-Downs
I am trying to design a page with linked drop-downs so that when you make one selection the next drop down is limited to items within that selection. My code is listed below. One other problem I am having is that it is listing duplicates of all items that are listed more than once in the database, is there a way to fix that too?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
</head>
<body>
<form id="form1" runat="server">
<asp:DropDownList runat="server" id="DropDownList1" DataValueField="ReportedBy" DataTextField="ReportedBy" DataSourceID="SqlDataSource1">
</asp:DropDownList>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:ChecklistConnectionString %>" SelectCommand="SELECT * FROM [Sorted Responses Comm]">
</asp:SqlDataSource>
<asp:DropDownList runat="server" id="DropDownList2" DataValueField="DateReported" DataTextField="DateReported" DataSourceID="SqlDataSource1">
</asp:DropDownList>
<asp:DropDownList runat="server" id="DropDownList3" DataValueField="Title" DataTextField="Title" DataSourceID="SqlDataSource1">
</asp:DropDownList>
<asp:TextBox runat="server" id="TextBox1"></asp:TextBox>
</form>
</body>
</html>
Here is an example of how to do it: http://www.asp.net/data-access/tutorials/master-detail-filtering-with-two-dropdownlists-cs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked perfect thank you.