472,331 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,331 software developers and data experts.

System.Web.HttpException: The viewstate is invalid for this pageand might be corrupted

Hi,
I've a little problem, i've an asp.net page, with a runat server form,
like this:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="index.aspx.vb" Inherits="indexGstPro"%>
<HTML>
<HEAD>
</HEAD>
<body>
<form runat="server" method="post" id="indexGstPro">
</form>
</body>
</HTML>

now i want to go to another page by clicking a link, i've made this
javascript code:

document.indexGstPro.action = 'page.aspx';
document.indexGstPro.submit();

The page submits correctly, but the page i want to go return me this error:
System.Web.HttpException: The viewstate is invalid for this page and
might be corrupted

How can i solve the problem?

Gvnn

Nov 17 '05 #1
3 2063
Gvnn,

ASP.NET pages do not support submission to a different page. If you need
to do this, you will need to programmatically disable Viewstate for the
page prior to posting back. Here's what I mean.

document.indexGstPro.__VIEWSTATE.disabled = true;
document.indexGstPro.action = 'page.aspx';
document.indexGstPro.submit();

Jim Cheshire [MSFT]
Developer Support
ASP.NET
ja******@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
Date: Fri, 17 Oct 2003 14:46:30 +0200
From: Gvnn <in**@gvnn.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: System.Web.HttpException: The viewstate is invalid for this page
and might be corrupted
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <eV*************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 62.94.108.71
Lines: 1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:184894
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,
I've a little problem, i've an asp.net page, with a runat server form,
like this:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="index.aspx.vb" Inherits="indexGstPro"%>
<HTML>
<HEAD>
</HEAD>
<body>
<form runat="server" method="post" id="indexGstPro">
</form>
</body>
</HTML>

now i want to go to another page by clicking a link, i've made this
javascript code:

document.indexGstPro.action = 'page.aspx';
document.indexGstPro.submit();

The page submits correctly, but the page i want to go return me this error:
System.Web.HttpException: The viewstate is invalid for this page and
might be corrupted

How can i solve the problem?

Gvnn


Nov 17 '05 #2
Check out this faq, this might help you
http://www.extremeexperts.com/Net/FA...isCorrupt.aspx

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Gvnn" <in**@gvnn.it> wrote in message
news:eV*************@TK2MSFTNGP12.phx.gbl...
Hi,
I've a little problem, i've an asp.net page, with a runat server form,
like this:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="index.aspx.vb" Inherits="indexGstPro"%>
<HTML>
<HEAD>
</HEAD>
<body>
<form runat="server" method="post" id="indexGstPro">
</form>
</body>
</HTML>

now i want to go to another page by clicking a link, i've made this
javascript code:

document.indexGstPro.action = 'page.aspx';
document.indexGstPro.submit();

The page submits correctly, but the page i want to go return me this error: System.Web.HttpException: The viewstate is invalid for this page and
might be corrupted

How can i solve the problem?

Gvnn

Nov 17 '05 #3
Check out this faq, this might help you
http://www.extremeexperts.com/Net/FA...isCorrupt.aspx

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Gvnn" <in**@gvnn.it> wrote in message
news:eV*************@TK2MSFTNGP12.phx.gbl...
Hi,
I've a little problem, i've an asp.net page, with a runat server form,
like this:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="index.aspx.vb" Inherits="indexGstPro"%>
<HTML>
<HEAD>
</HEAD>
<body>
<form runat="server" method="post" id="indexGstPro">
</form>
</body>
</HTML>

now i want to go to another page by clicking a link, i've made this
javascript code:

document.indexGstPro.action = 'page.aspx';
document.indexGstPro.submit();

The page submits correctly, but the page i want to go return me this error: System.Web.HttpException: The viewstate is invalid for this page and
might be corrupted

How can i solve the problem?

Gvnn

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mita | last post by:
I Am trying to post my form on to a second page, but it keeps coming with a, error: Exception Details: System.Web.HttpException: The View State is...
5
by: Hardy Wang | last post by:
Hi all: I developed a web site, it passed various testing internally. When I put this site in production, I receive some error reports from this...
2
by: Mike | last post by:
hi to all does any body know or receive this message before and how i can repare this: The viewstate is invalid for this page and might be...
2
by: Nicolas LeBlanc | last post by:
I've seen several message on newsgroup, but none helped me fixed this damned problem. I am not on a load balancing, and the copy in the server is...
2
by: TS | last post by:
I have some inner exceptions on dev and production server saying: Invalid character in a Base-64 string. OR Invalid Length of a Base-64 string or...
1
by: dima | last post by:
Hi All, I know some of you had this problem in production. Did anyone find out how to fix this problem or what is the cause of it? ...
7
by: GS | last post by:
Hello, I'm receiving The state information is invalid for this page and might be corrupted error message when running code below. This happens...
0
by: Jeremy Chapman | last post by:
I am thinking of implementing System.Web.UI.SessionPageStatePersister as a method of storing viewstate in the session. Before I do, I am browsing...
4
by: JamTech | last post by:
The Script Resource and the Web Resource files are generating intermittent errors in my application. I have been trying to chase the cause of the...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.