Tag: drop-down-menu

Drop down list c#

问题内容: I have dropdownlist like this <asp:DropDownList ID="ddl1" runat="server" DataTextField="Val" DataValueField="ValID" AutoPostBack="true" OnSelectedIndexChanged="ddl1change"></asp:DropDownList> <asp:DropDownList ID="ddl2" runat="server" DataTextField="Val" DataValueField="ValID" AutoPostBack="true" OnSelectedIndexChanged="ddl1change"></asp:DropDownList> <asp:DropDownList ID="ddl3" runat="server" DataTextField="Val" DataValueField="ValID" AutoPostBack="true" OnSelectedIndexChanged="ddl1change"></asp:DropDownList> This is the OnSelectedIndexChanged function in the cs page protected void ddl1change(object sender, EventArgs e) { try { DropDownList ddltemp = sender as DropDownList; if (ddltemp.SelectedItem.Text != "---Select---")