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. problem when using sessions

problem when using sessions

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 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.
  • D Offline
    D Offline
    dittu7
    wrote on last edited by
    #1

    hi every one, it's a very small thing. i'm using session don't know where was i gone wrong. pls help me.. :( IN PAGE1.ASPX If CheckBox1.Checked = True Then Session("value") = "chkT" IN PAGE2.ASPX Dim check As String = Session("value") If (check = "chkT") Then some work code goes here Else another some work code goes here End If and checkbox is given to AutoPostBack="True" but the problem is when i run the application and checked the checkbox going fine and again without closing application when i checked off the checkbox i'm geting the result as the previous one only.. again when i close and start the application and now going without checking the checkbox, going fine, doing the work that should be if checkbox is not checked. but againg with out closing the application when i check the checkbox i'm getting the work as the previous one only i don't know where the wrong is. whether there is any syntax error? could you please help .. thanks in advance dittu

    S K 2 Replies Last reply
    0
    • D dittu7

      hi every one, it's a very small thing. i'm using session don't know where was i gone wrong. pls help me.. :( IN PAGE1.ASPX If CheckBox1.Checked = True Then Session("value") = "chkT" IN PAGE2.ASPX Dim check As String = Session("value") If (check = "chkT") Then some work code goes here Else another some work code goes here End If and checkbox is given to AutoPostBack="True" but the problem is when i run the application and checked the checkbox going fine and again without closing application when i checked off the checkbox i'm geting the result as the previous one only.. again when i close and start the application and now going without checking the checkbox, going fine, doing the work that should be if checkbox is not checked. but againg with out closing the application when i check the checkbox i'm getting the work as the previous one only i don't know where the wrong is. whether there is any syntax error? could you please help .. thanks in advance dittu

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      dittu7 wrote:

      If CheckBox1.Checked = True Then Session("value") = "chkT"

      Where in the page is this code written? On which event. Is this code running eveytime you click on checkbox? used Debugger? Further, what do you mean by 'without closing application when i check..."? You are on two different pages, right? Can you clear your work flow stepwise maybe.

      1 Reply Last reply
      0
      • D dittu7

        hi every one, it's a very small thing. i'm using session don't know where was i gone wrong. pls help me.. :( IN PAGE1.ASPX If CheckBox1.Checked = True Then Session("value") = "chkT" IN PAGE2.ASPX Dim check As String = Session("value") If (check = "chkT") Then some work code goes here Else another some work code goes here End If and checkbox is given to AutoPostBack="True" but the problem is when i run the application and checked the checkbox going fine and again without closing application when i checked off the checkbox i'm geting the result as the previous one only.. again when i close and start the application and now going without checking the checkbox, going fine, doing the work that should be if checkbox is not checked. but againg with out closing the application when i check the checkbox i'm getting the work as the previous one only i don't know where the wrong is. whether there is any syntax error? could you please help .. thanks in advance dittu

        K Offline
        K Offline
        koolprasad2003
        wrote on last edited by
        #3

        R u writing this code on Page_Load() event. if yes, do the code under (! IsPostBack()) function. regards

        Rating always..... WELCOME Be a good listener...Because Opprtunity knoughts softly...N-Joy

        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