Session lose value
-
Hi all, I am using linkbutton in datagrid and ONCOMMAND event I collect row ID. This Id I am saving in Session("ID").I displayed this session("ID") by messagebox on same page.Everything goes fine,but when I redirect to another page and try to use session("ID") it gives nothing. Sub Navigation(ByVal sender As Object, ByVal e As CommandEventArgs) Session("ID") = e.CommandArgument MsgBox(Session("ID")) Response.Redirect("ResumeSearchDetails.aspx") End Sub ///ResumeSearchDetails.aspx Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then MsgBox(Session("ID")) end if end sub MsgBox(Session.SessionID) gives some value on both page which is not same that means total session is not expired only value lose. I hope you understand my problem. Thanks. Teach Life To Laugh.......
-
Hi all, I am using linkbutton in datagrid and ONCOMMAND event I collect row ID. This Id I am saving in Session("ID").I displayed this session("ID") by messagebox on same page.Everything goes fine,but when I redirect to another page and try to use session("ID") it gives nothing. Sub Navigation(ByVal sender As Object, ByVal e As CommandEventArgs) Session("ID") = e.CommandArgument MsgBox(Session("ID")) Response.Redirect("ResumeSearchDetails.aspx") End Sub ///ResumeSearchDetails.aspx Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then MsgBox(Session("ID")) end if end sub MsgBox(Session.SessionID) gives some value on both page which is not same that means total session is not expired only value lose. I hope you understand my problem. Thanks. Teach Life To Laugh.......
-
In global.asax on Session_onStart initialize as Session("ID")=null and find whether there is any other assignment in the other pages for Session("ID"). set break point on session_onstart event to find when session got initialized
Hi Saumal, We are meeting second time last time You teach lots to me. It may be my mistake that I could not find Global.Aspx in my application.I am using .net2005 (I know in .net2003 global.ascx present in current application folder)
-
Hi Saumal, We are meeting second time last time You teach lots to me. It may be my mistake that I could not find Global.Aspx in my application.I am using .net2005 (I know in .net2003 global.ascx present in current application folder)
-
Hi, Thanks,Ones again you solve my problem. I have added Session("ID")=null in Global.asax Now It's working fine. But Is there any problem if any another page in application assign value to Session("ID") Best Regards, Nagraj Let's Teach Life To Laugh....... -- modified at 8:03 Monday 19th June, 2006