Articles → ASP .NET MVC → How MVC Maintains Values Without Viewstate

How MVC Maintains Values Without Viewstate







  1. One is a sample MVC application that contains a textbox and a button
  2. Other is another sample web form application that also contains the same set of controls i.e. textbox and button.


Picture showing the sample web page of webform and MVC application
Click to Enlarge



  1. Run the application by pressing F5 (run one application at one time)
  2. Open developer tool (press F12)
  3. Go to Network tab
  4. Click on ‘Start Capturing’ (see the following figure)
  5. Picture showing the Start Capturing button to capture the traffic on the web page
    Click to Enlarge

  6. Enter some value in textbox
  7. Click on the button.
  8. Click on ‘Stop Capturing’
  9. Click on ‘Got to detailed view’ button




Picture showing the response body of the webform application
Click to Enlarge





Picture showing the response body of the MVC application
Click to Enlarge






But How The Values Remain Intact In MVC?





Posted By  -  Karan Gupta
 
Posted On  -  Friday, July 31, 2015

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250