RePost: Invalid viewstate

  • Thread starter Thread starter Jeremy Ames
  • Start date Start date
J

Jeremy Ames

Ok, I was wrong. It pains me to say that, but it does happen occasionally.
LOL It is not actually a Server.Transfer that is causing that problem but
some javascript that I have tied to some hyperlinks. I have created the
hyperlinks at run time and attached them to a piece of javascript that
changes a value and then submits the form.

Since noticing the cause of the problem I have tried addind event handlers
to the hyper links, but they do not have a click event.

"Alvin Bruney" <vapor at steaming post office> wrote in message
It's sometimes a good idea to google before posting. Here is what i found
http://www.extremeexperts.com/Net/FAQ/ViewStateisCorrupt.aspx
see if that helps you
 
By default, ASP.Net checks the viewstate value: the received viewstate
should belong to
the exact page that is now trying to process it. If that is not the case
(due to Server.Transfer
or possibly client-side javascript changing the form action) then your error
is thrown.

The way to prevent this error is to set EnableViewstateMac to "false" (page
directive)

Hans Kesting
 
Back
Top