在A.aspx中写一个Server级表单域,将表单值传递到B.aspx
一般这么做就可以达到目的了,可是今天用的时候在B页出现了错误,错误提示:
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。
修改方法, 在B页的page标签中加入EnableViewStateMac="false",如下