J
Joe Stampf
I have come across a problem where I would like to post my form data to an
aspx page different from the one that is posting. Nothing unusual, right?
The problem is that you can't do this when you are using viewstate! b/c the
hidden viewstate field gets posted along with your data. When it hits the
target page, asp.net validates it, sees it is a viewstate from a different
page, and throws an exception.
Is there something I'm missing, something to 'turn off' to bypass this
problem that shouldn't be a problem?
Note that there is a page directive 'ValidateViewstate' that you can set to
false (off), but there are 2 problems preventing me from using this (1) it
opens your app up to considerable risk from attackers, and (2) it didn't
work -- it still generated the exception.
Also note that I could declare a different form in the client to house and
post my data, but this is not an option for me b/c I need to use the
server-side form (only one is allowed) to house the controls whose data is
being posted.
Hope someone can help...
aspx page different from the one that is posting. Nothing unusual, right?
The problem is that you can't do this when you are using viewstate! b/c the
hidden viewstate field gets posted along with your data. When it hits the
target page, asp.net validates it, sees it is a viewstate from a different
page, and throws an exception.
Is there something I'm missing, something to 'turn off' to bypass this
problem that shouldn't be a problem?
Note that there is a page directive 'ValidateViewstate' that you can set to
false (off), but there are 2 problems preventing me from using this (1) it
opens your app up to considerable risk from attackers, and (2) it didn't
work -- it still generated the exception.
Also note that I could declare a different form in the client to house and
post my data, but this is not an option for me b/c I need to use the
server-side form (only one is allowed) to house the controls whose data is
being posted.
Hope someone can help...