在 Default.aspx 上,我编写了这段代码,它成功地向我展示了 Webform1.aspx,但是当我单击该按钮时它也有一个按钮,它给了我错误
protected void Page_Load(object sender, EventArgs e)
{
var pageView = PageParser.GetCompiledPageInstance("~/WebForm1.aspx", Server.MapPath("~/WebForm1.aspx"), HttpContext.Current);
(pageView).ProcessRequest(HttpContext.Current);
}
按钮点击错误
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.