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. Response.end()

Response.end()

Scheduled Pinned Locked Moved ASP.NET
help
5 Posts 3 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.
  • B Offline
    B Offline
    brahmareddy81
    wrote on last edited by
    #1

    My session variable become null after response.end().please help me

    G 1 Reply Last reply
    0
    • B brahmareddy81

      My session variable become null after response.end().please help me

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      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; }

      B 1 Reply Last reply
      0
      • G Guffa

        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; }

        B Offline
        B Offline
        brahmareddy81
        wrote on last edited by
        #3

        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. }

        G J 2 Replies Last reply
        0
        • B brahmareddy81

          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. }

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          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; }

          1 Reply Last reply
          0
          • B brahmareddy81

            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. }

            J Offline
            J Offline
            jitendra gupta
            wrote on last edited by
            #5

            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.

            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