Msgstr "Viewstate MAC address validation error" when posting back to another page

I am working on a web form that works great while it returns to itself. In Report.aspx, I have:

<form runat="server" method="post"> 

but when I try to send it to another page:

 <form runat="server" method="post" action="DisplayReport.aspx"> 

I get the error "Validation of viewstate MAX failed". I tried to set the machine key and disable viewstate in web.config, but nothing helps. Am I stuck a message on the same page? If so, what is the point of the action attribute?

+4
source share
2 answers

You can send to another page, but you need to use the PostBackUrl property of the button, and not the form's action attribute.

Instead of this:

 <form runat="server" method="post" action="DisplayReport.aspx"> <!-- form stuff goes here --> <asp:button runat="server" text="Submit" /> </form> 

Do it:

 <form runat="server"> <!-- form stuff goes here --> <asp:button runat="server" text="Submit" postbackurl="DisplayReport.aspx" /> </form> 
+11
source

Feedback links should be available, you just need to configure them like this. See Link http://csharpdotnetfreak.blogspot.com/2009/08/cross-page-posting-in-aspnet.html

0
source

All Articles