Posted on: 3/5/2014 1:00:52 AM | Views : 536

Hey Gurus
I am trying to figure out a way to databind to a hiddenfield. Here is a snippet of my code. I am trying to grab data using the Drop Down value in a sql statement.
Thanks for all help
<asp:DropDownList ID="ddlDSM" AppendDataBoundItems="True" runat="server" AutoPostBack="True" Width="203px" onselectedindexchanged="ddlDSM_SelectedIndexChanged"> </asp:DropDownList> <asp:HiddenField ID="hdnDistrictName" runat="server" /> <asp:Label ID="lblHidden" runat="server"></asp:Label> Code Behind protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadDSM(); } } public virtual DataSet RunSQLString(string strSQL) { SqlConnection objCnn = new SqlConnection(DBConnection); SqlCommand ob ...

Go to the complete details ...