Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:15:00+00:00 2026-05-30T15:15:00+00:00

textBox values across postback do NOT maintain in Viewstate. http://msdn.microsoft.com/en-us/library/ms972976.aspx When the ASP.NET Web

  • 0

textBox values across postback do NOT maintain in Viewstate.

http://msdn.microsoft.com/en-us/library/ms972976.aspx

When the ASP.NET Web page is posted back in the load postback data
stage, the Page class sees that one of the posted back form fields
corresponds to the IPostBackDataHandler interface. There is such a
control in the hierarchy, so the TextBox’s LoadPostData() method is
invoked, passing in the value the user entered into the TextBox
("Hello, World!"). The TextBox’s LoadPostData() method simply assigns
this passed in value to its Text property. the values are identified
via posted back form field values, and assigned in the LoadPostData()
method for those controls that implement IPostBackDataHandler.

Now lets talk about TextBox.OnTextChanged Method

It says there that:

Note

A TextBox control must persist some values between posts to the
server for this event to work correctly. Be sure that view state is
enabled for this control.

Question:

So I guess that for certain events, it does write to the Viewstate…

How does it tell ASP.NET to "Start tracking changes into the Viewsstate"?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:15:01+00:00Added an answer on May 30, 2026 at 3:15 pm

    When you enable ViewState for a TextBox, it will simply be saved there.


    ASPX Page Example

     <asp:TextBox ID="tb" runat="server" EnableViewState="true"></asp:TextBox>
    

    C# (Code-behind) Example

    tb.EnableViewState = true;
    

    Your quote talks about the fact that this value is not needed when restoring the Form on Postback.

    So you can turn off ViewState for a TextBox and it will still retain its value. But OnChanged will not work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to get an ASP.NET textbox to accept only currency values,
I have read that the viewstate in asp.net stores the values of control properties
Using ASP.Net, VB.Net In my web page, i have the textbox values when i
Is it possible to know if any of the textbox values have changed in
I am checking for values in a textbox to trigger a conditional statement, but
How can I assign values of the textbox to the datagridview cell ?
How to set up a TextBox to get only certain values. e.g. DateTime input
I have to compare 2 values which are the text property of 2 textbox
How i can add the multiple values from a datagrid to textbox in C#?
I'm trying to autocomplete a textbox. I'm retrieving values from Access Database. Just one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.