I have a DropDownList bound to a SqlDataSource like so:
<asp:SqlDataSource ID="chooseQuoteSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:*** %>"
SelectCommand="SELECT [order_id], [order_ref] FROM [orders] ORDER BY [order_ref]">
</asp:SqlDataSource>
Order Ref:
<asp:DropDownList ID="chooseQuoteDropDownList" runat="server" AutoPostBack="True"
CssClass="catDDL" DataSourceID="chooseQuoteSqlDataSource" DataTextField="order_ref"
DataValueField="order_id" AppendDataBoundItems="True" OnSelectedIndexChanged="chooseQuoteDropDownList_SelectedIndexChanged">
<asp:ListItem Value="0">Select Quote</asp:ListItem>
</asp:DropDownList>
The user chooses an order from the list then a GridView displays products in the order. In the SelectedIndexChanged, I store the SelectedValue of the DDL in Session as "OrderID"
The site, however, allows the user to click on ...
Go to the complete details ...