Session management
-
Hi When i work with session in my localhost its working fine. but in web server the session value is vanished . //Setting Session Value Session.Add["Test","testValue"] //Retrieving Session Value Session.Contents["Test"].toString()
r_palanivel83 10:01 4 Jan '06
-
Hi When i work with session in my localhost its working fine. but in web server the session value is vanished . //Setting Session Value Session.Add["Test","testValue"] //Retrieving Session Value Session.Contents["Test"].toString()
r_palanivel83 10:01 4 Jan '06
Hi Dear You can use session in Global.aspx file for better using of Sessions For examples i used below codes at one of my web application : (This code is a part of Global.aspx) <%@ Application Language="VB" %> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application startup End Sub Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application shutdown End Sub Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled error occurs End Sub Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) '------SessionID------------------------ Session("SID") = Session.SessionID '------Category------------------------ Dim PathArray(10, 2) As String Session.Add("tmpHeader", PathArray) Dim PathArrayIndex As Integer = 0 '------LetterTarget-------------------- <b> Dim LTG_PathArray(10, 2) As String Session.Add("tmpHeader", LTG_PathArray) Dim LTG_PathArrayIndex As Integer = 0 Dim PerID As Integer = 0 Dim LetterID As Integer = 0 Dim Mode As String = "" Session.Add("LoginPerID", PerID) Session.Add("LetterID", LetterID) Session.Add("Mode", Mode)</b> End Sub excuse me for my bad english writing :( <div class="ForumSig">Best Regards Hussein Madani Ghomi - h_madani_gh@yahoo.com - Madani@SatrapTeam.ir (+98-912-5577-832)</div></x-turndown>
-
Hi Dear You can use session in Global.aspx file for better using of Sessions For examples i used below codes at one of my web application : (This code is a part of Global.aspx) <%@ Application Language="VB" %> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application startup End Sub Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs on application shutdown End Sub Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled error occurs End Sub Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) '------SessionID------------------------ Session("SID") = Session.SessionID '------Category------------------------ Dim PathArray(10, 2) As String Session.Add("tmpHeader", PathArray) Dim PathArrayIndex As Integer = 0 '------LetterTarget-------------------- <b> Dim LTG_PathArray(10, 2) As String Session.Add("tmpHeader", LTG_PathArray) Dim LTG_PathArrayIndex As Integer = 0 Dim PerID As Integer = 0 Dim LetterID As Integer = 0 Dim Mode As String = "" Session.Add("LoginPerID", PerID) Session.Add("LetterID", LetterID) Session.Add("Mode", Mode)</b> End Sub excuse me for my bad english writing :( <div class="ForumSig">Best Regards Hussein Madani Ghomi - h_madani_gh@yahoo.com - Madani@SatrapTeam.ir (+98-912-5577-832)</div></x-turndown>
HI Hussein Thank you for ur reply. Is it possible to assign the session value on web page. if i change the value of session variable ,there is no effect still its showing what we assign the value in Global.asax file... Regards RPL
r_palanivel83 10:01 4 Jan '06