473,385 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2155
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 invalid for this page and might be corrupted. ...
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 site saying "the viewstate is invalid for this page...
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 corrupted. thank's Mike
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 there for ages, and yet I receive 10 to 20 times...
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 something like that. I cannot recreate this...
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? System.Web.HttpException: Invalid_Viewstate ...
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 on second post back. Why is it happening? My...
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 threw the class's code using reflector just to get...
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 problem but to no avail. I notice that the “d”...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.