asked on
private void ListBoxTextChangedChanged(object sender, EventArgs e)
{
ListBox lb = (ListBox)sender;
string name =lb.ID;
name = name.Substring(3);
int index = lb.SelectedIndex;
settings[name] = lb.Text;
Response.Write("1. " + settings["First_Name"].ToString());
Session["MySettings"] = settings;
}
Soon after the click I get the following on the screen because of Response.Write(...) in these events: if (IsPostBack)
{
settings = (Dictionary<string, string>)Session["MySettings"];
Response.Write("2. " + settings["First_Name"].ToString());
settings = HttpContext.Current.Session["MySettings"] as Dictionary<string, string>;
AddListBoxes(listBoxes,"PstBack");
}