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

  • Home
  • SEARCH
  • 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 8099825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:32:19+00:00 2026-06-05T22:32:19+00:00

Based on an answer from a candidate I have a confusion regarding the functioning

  • 0

Based on an answer from a candidate I have a confusion regarding the functioning of ViewState in an ASP.Net application. According to the candidate If you have a control with some value and you change that value, on postback it sends the initial value as well as the changed value to the server. So if you continue to change values and submit, the whole tree is sent to the server. I tried searching online but couldnt get any facts regarding the same.

If the above description was confusing, here is an example to give more clarity on the claims:
– We have <asp:TextBox ID="txt1" runat="Server" Text="First Value"/>
– After the page loads i enter “Second Value” in txt1 and hit submit and same page loads again (since i have written no logic in the click event)
– Now I enter “Third Value” in txt1and hit submit again.

According to the candidate the first time I hit submit, both “First Value” & “Second Value” are sent to the server and when the page loads after that, it encrypts both those values and puts it in the ViewState so when I hit submit the second time, the encrypted value in viewstate (which has both “First Value” & “Second Value”) is submitted along with “Third Value”.

I am not from an engineering background and the candidate was and claimed this is what was taught to him in University. I just want to know if there is any amount of truth in those claims. Any help is appreciated.

  • 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-06-05T22:32:21+00:00Added an answer on June 5, 2026 at 10:32 pm

    No, that’s not true.

    On the second submit, “Second Value” will be sent as part of the ViewState hidden field, and “Third Value” as the value of the TextBox.

    However, all three values will be visible on the server at different times during the page lifecycle (which may be what’s causing the confusion).

    • During the Init phase of the page lifecycle “First Value” will be set (from the page markup).

    • During the LoadViewState phase, this will be replaced by “Second Value” (from the ViewState)

    • During the LoadPostbackData phase, this will be replaced by “Third Value”.

    On the next Postback (say “Fourth Value”), you’ll be able to see “First Value”, “Third Value” and “Fourth Value” at different times during the page lifecycle, but “Second Value” will be gone for good.

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

Sidebar

Related Questions

I'm developing a question/answer based application I have a Post table in the db
UPDATE: Solved. Thanks BusyMark! EDIT: This is revised based on the answer below from
I'am redesigning my backbone application based on the answer of @20100 to this question
this question is based on answer got from another SO question, can be found
SEE BELOW FOR SOLUTION BASED ON ANSWER/COMMENT from @Bertrand Le Roy ORIGINAL QUESTION: Not
Based on this answer Get the subdomain from a URL , I am trying
We're building a commandline application that needs some data from the IIS server using
I'm trying to redirect to a page but based on the answer from a
I'm currently in the middle of a reasonably large question / answer based application
Based on the answer from axtavt, this is almost certainly a naming problem between

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.