<asp:DropDownList ID="LocationSearch" Width="99%" AutoPostBack="true" OnSelectedIndexChanged="SearchTerms_Changed" runat="server" />
protected void SearchTerms_Changed(object sender, EventArgs e) { DropDownList thisDdl = (DropDownList)sender; string id = thisDdl.ID; string newVal = thisDdl.SelectedItem.Text; Session["Pass"] = newVal; }
!Page.IsPostBack
private void Page_Load() { if (!IsPostBack) { // Bind dropdwon here.. } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)