i can't seem to figure out how to use a SESSION variable to store/retrieve/set the value of a dropdown list when a user switches pages.
on the ASPX page, i have:
<asp:DropDownList ID="ddl_ProjectList" runat="server" AutoPostBack="True" DataSourceID="sql_ProjectList" DataTextField="project" DataValueField="project_key" EnableViewState="true" OnSelectedIndexChanged="ddl_ProjectList_SelectedIndexChanged">
</asp:DropDownList>
and on the ASPX.CS page, i have:
protected void ddl_ProjectList_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList SourceDropDownList = (DropDownList)Page.FindControl("ddl_ProjectList");
System.Web.HttpContext.Current.Session["project"] = SourceDropDownList.SelectedValue.ToString();
}
then... when i run the app and change the dropdownlist, i get the following:
Go to the complete details ...