I’m looking in ASP.NET MVC source and don’t found where ViewState is removed from application.
(The ViewState is not just disabled, it is removed of all pages in application)
Thanks!
Update:
Is remove Viewstate hidden field possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
That’s easy; it isn’t removed. You can still set and read ViewState. Just don’t expect it to contain anything from the previous request. This is actually convenient, because it means that certain ASP.NET server controls which store their property values in ViewState can be made to work in ASP.NET MVC. As long as it’s not important to persist ViewState from one request to another, these controls still work fine.
Removing the persistence of ViewState from one request to another makes it close to useless, of course. This is why people generally say that ASP.NET MVC “doesn’t have ViewState.” This isn’t technically accurate; ViewState actually does exist; it just doesn’t exist in a form which is useful for anything.