I have heard that MVC .NET is stateless. What are the implications of this and why is it that MVC is stateless.
State is managed in ASP.NET (MVC and WebForms) through several means:
MVC eliminates ViewState, which means that controls (text boxes, checkboxes, etc.) lose their values each time a page is posted back. You need to repopulate them manually or through other means (Model binding, for instance).
MVC isn't truly stateless, but it does remove one of the most common ways of persisting state in ASP.NET -- the ViewState.
MVC is stateless because HTTP is. There is nothing in HTTP that indicates when a session starts or ends.
Every web framework tries to overcome this by using either a cookie or Request/Response features like the query string or FORM post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With