I have read different topics, tutorials etc... Everywhere there is an information that ASP.NET MVC
has an advantage for not using/containg a ViewState
stuff.
Really?
So... How could it be (look at the screenshot)?
http://s18.postimg.org/rvgm2ypjt/Screenshot_568.png
As you can see in the screen it isn't a WebForms
project.
I just added the next code in the one View
:
Why do I have a Viewstate
in my ASP.NET MVC
project?
<form class="form-horizontal" id="MainForm" runat="server">
If you are using runat="server"
, then you are invoking webforms; don't do that. This is MVC - you don't need that. Just change it to:
<form class="form-horizontal" id="MainForm">