1.按回车键的代码
<script>
function enterPress() { if (event.keyCode == 13) { form1.action="YellowPagesDetail.aspx?WebsiteName="+escape(document.all.searchtxb.value); form1.submit(); return true; } return false; } </script>
2.页面a1.aspx
<input id="searchtxb" οnfοcus="this.select()" οnmοuseοver="this.focus()" name="word" οnkeydοwn="enterPress()" type="text"/>
当你在这个页面输入内容按回车键时,会报错“证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配”
3.解决办法
在你 调转(action)过去的那个页面@page属性添加 EnableViewStateMac="false" 就Ok了
转载请注明原文地址: https://ibbs.8miu.com/read-2219191.html