Gab*_*elC 2 asp.net-mvc postback servercontrols
单击该按钮后,它会抛出"viewstate MAC failed的验证"异常.我知道MVC不支持PostBack但是有什么方法可以解决这个问题吗?
或者我们需要在MVC中使用HtmlHelper?
以下是我在View中的代码:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1" runat="server">
<h2>Hello World</h2>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
</asp:Content>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1255 次 |
| 最近记录: |