Author: fretha | Posted on: 4/4/2010 6:07:42 PM | Views : 267

Hello,
I have a problem with assigning a new value to session variables. On my search page I have a search field. When the user click "search" I retreive the string from the search text box and assign it to a session variable. If the user return to the search page I set searchfield text = MySessinVariable. So far everything is fine but if the user change the search string and click search the session variable doesn't update with the new value. Here is the code for the page load.
protected void Page_Load(object sender, EventArgs e) { searchTextBox.Focus(); if (Session["SearchString"] != null) searchTextBox.Text = Session["SearchString"].ToString();
 and for the button click:
protected void searchButton_Click(object sender, EventArgs e) { ...

Go to the complete details ...