Remembering values between postbacks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nathan Sokalski

    #1

    Remembering values between postbacks

    I have 2 private variables in my class that I need to remember the values of
    between postbacks (or actually callbacks, since I am using AJAX). I want to
    avoid using session variables, if possible. Is there any other way to have
    VB.NET maintain the values of these variables between postbacks & callbacks?
    Thanks.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。



  • Eliyahu Goldin

    #2
    Re: Remembering values between postbacks

    ViewState

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]




    "Nathan Sokalski" <njsokalski@hot mail.comwrote in message
    news:%233nlOo04 HHA.1992@TK2MSF TNGP03.phx.gbl. ..
    >I have 2 private variables in my class that I need to remember the values
    >of between postbacks (or actually callbacks, since I am using AJAX). I want
    >to avoid using session variables, if possible. Is there any other way to
    >have VB.NET maintain the values of these variables between postbacks &
    >callbacks? Thanks.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。

    >

    Comment

    • Cor Ligthert[MVP]

      #3
      Re: Remembering values between postbacks

      Eliyahu,

      Is this not putting the horse behind the car, using ajax and then send the
      variables over the line?

      This is more ment for Nathan than for you.

      Cor

      "Eliyahu Goldin" <REMOVEALLCAPIT ALSeEgGoldDinN@ mMvVpPsS.orgsch reef in
      bericht news:u9YGau04HH A.1168@TK2MSFTN GP02.phx.gbl...
      ViewState
      >
      --
      Eliyahu Goldin,
      Software Developer
      Microsoft MVP [ASP.NET]


      >
      >
      "Nathan Sokalski" <njsokalski@hot mail.comwrote in message
      news:%233nlOo04 HHA.1992@TK2MSF TNGP03.phx.gbl. ..
      >>I have 2 private variables in my class that I need to remember the values
      >>of between postbacks (or actually callbacks, since I am using AJAX). I
      >>want to avoid using session variables, if possible. Is there any other way
      >>to have VB.NET maintain the values of these variables between postbacks &
      >>callbacks? Thanks.
      >--
      >Nathan Sokalski
      >njsokalski@hotm ail.com
      >http://www.nathansokalski.com/
      >>
      >
      >

      Comment

      • Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

        #4
        Re: Remembering values between postbacks

        I'd suggest you use ViewState in this situation.
        Here are some other options, though:


        --
        I hope this helps,
        Steve C. Orr,
        MCSD, MVP, CSM, ASPInsider



        "Nathan Sokalski" <njsokalski@hot mail.comwrote in message
        news:%233nlOo04 HHA.1992@TK2MSF TNGP03.phx.gbl. ..
        >I have 2 private variables in my class that I need to remember the values
        >of between postbacks (or actually callbacks, since I am using AJAX). I want
        >to avoid using session variables, if possible. Is there any other way to
        >have VB.NET maintain the values of these variables between postbacks &
        >callbacks? Thanks.
        --
        Nathan Sokalski
        njsokalski@hotm ail.com
        有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。

        >

        Comment

        • Eliyahu Goldin

          #5
          Re: Remembering values between postbacks

          Re Is there any other way
          >to have VB.NET maintain the values of these variables between postbacks
          &
          >callbacks?
          I think the OP has to state clearly whether he is planning on postbacks or
          callbacks. ViewState is obviously good for postbacks. This thread may help
          for ViewState between callbacks:

          A broad category of Microsoft tools, languages, and frameworks for software development. Designed to support developers in building, debugging, and deploying applications across various platforms.


          --
          Eliyahu Goldin,
          Software Developer & Consultant
          Microsoft MVP [ASP.NET]



          "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
          news:84638863-47CA-40D5-9972-C9F1E17212BB@mi crosoft.com...
          Eliyahu,
          >
          Is this not putting the horse behind the car, using ajax and then send the
          variables over the line?
          >
          This is more ment for Nathan than for you.
          >
          Cor
          >
          "Eliyahu Goldin" <REMOVEALLCAPIT ALSeEgGoldDinN@ mMvVpPsS.orgsch reef in
          bericht news:u9YGau04HH A.1168@TK2MSFTN GP02.phx.gbl...
          ViewState

          --
          Eliyahu Goldin,
          Software Developer
          Microsoft MVP [ASP.NET]




          "Nathan Sokalski" <njsokalski@hot mail.comwrote in message
          news:%233nlOo04 HHA.1992@TK2MSF TNGP03.phx.gbl. ..
          >I have 2 private variables in my class that I need to remember the
          values
          >of between postbacks (or actually callbacks, since I am using AJAX). I
          >want to avoid using session variables, if possible. Is there any other
          way
          >to have VB.NET maintain the values of these variables between postbacks
          &
          >callbacks? Thanks.
          --
          Nathan Sokalski
          njsokalski@hotm ail.com
          有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。

          >
          >

          Comment

          Working...