Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View state error .. 1

Status
Not open for further replies.

cfprg

Programmer
Apr 14, 2004
38
US
Hello there,

My form has "runat=server", and it is submitted to another page. The error i get is in "viewstate".

This is one of the error messages: "2) Viewstate can only be posted back to the same page."

I believe with viewstate i can't submit my data to some other page, As i always do in classic asp... I tried to turn of viewstate using "enable viewstate = false"..but i couldn't..

Is there any way to get rid of this problem in this case (i.e submitting my form to another page without viewstate..)

I am new to asp.net(vb.net)..

Any help is really appreciated...

Thanks...
 
Remove runat="Server" from your Form tag. Also, you might as well just use HTML controls if you are going to post to another form. An alternative to doing it that way is to to use runat="Server" in your form and use Server Controls. Then just do a Server.Transfer("page2.aspx",true) which will retain all of your "posted" control values. Then you can get at them all using the Request.Form collection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top