Response.end()
-
My session variable become null after response.end().please help me
-
My session variable become null after response.end().please help me
What do you mean? The Response.End method ends the execution of the page. Unless you catch the exception that the method uses internally, no more code is executed. Where is it that you try to use session variables after Response.End? --- b { font-weight: normal; }
-
What do you mean? The Response.End method ends the execution of the page. Unless you catch the exception that the method uses internally, no more code is executed. Where is it that you try to use session variables after Response.End? --- b { font-weight: normal; }
Thanks for your replay, Before response.end() i had a session variable Session["ClientID"]=241 after Response.end() the page is refreshed then the session value ecomes null Session["ClientID"]=""; my code page_load() { Session["ClientID"]=241 } Button_Click() { //code here for download a file Response.End(); } Button2_Click() { Response.write((int)Session["ClientID"]); //here i am getting problem session becomes null here. }
-
Thanks for your replay, Before response.end() i had a session variable Session["ClientID"]=241 after Response.end() the page is refreshed then the session value ecomes null Session["ClientID"]=""; my code page_load() { Session["ClientID"]=241 } Button_Click() { //code here for download a file Response.End(); } Button2_Click() { Response.write((int)Session["ClientID"]); //here i am getting problem session becomes null here. }
Have you checked if the session handling works at all? Is it only in this specific situation that there is problems with setting session variables? Have you written out the Session.SessionID before and after the download so that you can verify that you still are in the same session? --- b { font-weight: normal; }
-
Thanks for your replay, Before response.end() i had a session variable Session["ClientID"]=241 after Response.end() the page is refreshed then the session value ecomes null Session["ClientID"]=""; my code page_load() { Session["ClientID"]=241 } Button_Click() { //code here for download a file Response.End(); } Button2_Click() { Response.write((int)Session["ClientID"]); //here i am getting problem session becomes null here. }
hi, when u clicking the first button the page will stope execution and all page information will not show in your page like button through which u want to print the clientid . You can get the clientid in next page only.