EnableViewState

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

    #1

    EnableViewState

    Hi, All,
    When I set the EnableViewState =false for a Textbox web control, the value
    still stays when it postback. Should it? Thanks




  • Natty Gur

    #2
    Re: EnableViewState

    Yes,

    The Input values return in the Form collection. For complex types like
    ComboBox viewstate will save all the control data (list items) so on
    postback you don’t need to recreate the list items.

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • Steve C. Orr, MCSD

      #3
      Re: EnableViewState

      Yes it should.
      Textboxes do not use ViewState to hold their value. This is handled by
      standard HTML.

      --
      I hope this helps,
      Steve C. Orr, MCSD



      "JohnG" <JGAO2183@roger s.com> wrote in message
      news:V3jZa.1445 88$rsJ.67155@ne ws04.bloor.is.n et.cable.rogers .com...[color=blue]
      > Hi, All,
      > When I set the EnableViewState =false for a Textbox web control, the value
      > still stays when it postback. Should it? Thanks
      >
      >
      >
      >[/color]


      Comment

      • JohnG

        #4
        Re: EnableViewState

        Hi, Steve and Natty,
        Thanks for the response. My another question is if the textbox does not use
        viewstate, why does it provide viewstate property? Standard html does not
        retain the textbox value when submits.
        Thanks

        John

        "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
        news:OtoIHKwXDH A.2516@TK2MSFTN GP09.phx.gbl...[color=blue]
        > Yes it should.
        > Textboxes do not use ViewState to hold their value. This is handled by
        > standard HTML.
        >
        > --
        > I hope this helps,
        > Steve C. Orr, MCSD
        > http://Steve.Orr.net
        >
        >
        > "JohnG" <JGAO2183@roger s.com> wrote in message
        > news:V3jZa.1445 88$rsJ.67155@ne ws04.bloor.is.n et.cable.rogers .com...[color=green]
        > > Hi, All,
        > > When I set the EnableViewState =false for a Textbox web control, the[/color][/color]
        value[color=blue][color=green]
        > > still stays when it postback. Should it? Thanks
        > >
        > >
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...