Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Session management

Session management

Scheduled Pinned Locked Moved ASP.NET
sysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    R Palanivel
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • R R Palanivel

      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

      H Offline
      H Offline
      Hussein Madani Ghomi
      wrote on last edited by
      #2

      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>

      R 1 Reply Last reply
      0
      • H Hussein Madani Ghomi

        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>

        R Offline
        R Offline
        R Palanivel
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups