0

I am facing a problem of mixed information between sessions in my application. The problem occurs when a user loads a page and it populates a session (Session ["Whatever"]) ... so far so good. The problem starts to happen when that same user opens the same screen on another browser tab for example. He carries other information for the same session that is used on the first screen it opened. (Here is a small example)

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
         if (Request.QueryString["id"] != null)
         {
             if (Request.QueryString["id"] != "")
                 Session["Any"] = Request.QueryString["id"].ToString(); //<-Here it changes the session for the first tab
         }
    }
}

I wonder if there is a better way to do this. Has some way to create a unique identifier for each tab opened by the user? Or some unique id in order to concatenate the name of the session? So sessions would be only by open flap.

Thanked.

4

0 回答 0