473,546 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The viewstate is invalid for this page and might be corrupted.

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

Nov 18 '05 #1
2 2581
This generally happens if you try to transfer to a different page. The
viewstate is transferred to the new page and does not match up against the
controls on the new page. Are you trying to transfer control to a different
page?

"Mike" <bl****@hotmail .com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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

Nov 18 '05 #2
I did plenty of server.transfer s to different pages. It
doesn't force the posted viewstate onto the transferred
page AFAIK. You can access the original page properties
and viewstate from the target page using the
Context.Handler and typecasting the original page class on
it to get its values/viewstate if you somehow know what
the original page class is(you can pass some kind of
parameter in the querystring when doing server.transfer
for this purpose)

in class Search: Page
....
Server.Transfer ("Results.aspx? fromPage=Search ");
....

in class Results: Page

if(Request.Quer yString["fromPage"]=="Search")
{
Page pageThatTransfe rredToMe = (Search)Context .Handler;
//now you can get to the originally loaded page properties
}

Anyway, I usually get that error when I add/remove server
controls in an aspx/ascx file while having the page open
in the browser. If you do this and try to submit the page,
click something, you will get this error because the
version page you're submitting had a different set of
server controls thus a different viewstate than the
version of the page that's trying to load the submit
viewstate. You only have to reload the page(enter it again
in the adress bar) instead of submiting it...

You could be getting this error for some other reasons
though... a bit of code or something might be helpful...
Perhaps you corrupted the viewstate hidden input or the
form with javascript or modified the LoadViewState process
somehow... who knows...
-----Original Message-----
This generally happens if you try to transfer to a different page. Theviewstate is transferred to the new page and does not match up against thecontrols on the new page. Are you trying to transfer control to a differentpage?

"Mike" <bl****@hotmail .com> wrote in message
news:%2******* *********@TK2MS FTNGP10.phx.gbl ...
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

.

Nov 18 '05 #3

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

Similar topics

0
1785
by: Anup Jishnu | last post by:
Hi, I have installed ASP.Net application on a system. When accessing the Application from within the LAN, it works fine. However, when I access the application from the Internet, some pages gve the following error for VIEWSTATE. The internal network is protected by a Firewall. My suspicion is that
4
1470
by: Rob Reckless | last post by:
I'm creating a web application using c# and keep getting the following error: The viewstate is invalid for this page and might be corrupted. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
2
1763
by: sarvjeet Saini | last post by:
My application is working fine on our local server.We tried on two local servers for testing purpose. But when we host on our main server ,we got the following error: some it work Fine but not always... *********************************************************** Server Error in '/' Application. The viewstate is invalid for this page...
5
2081
by: Anup Jishnu | last post by:
Hi, I have installed ASP.Net application on a system. When accessing the Application from within the LAN, it works fine. However, when I access the application from the Internet, some pages gve the following error for VIEWSTATE. The internal network is protected by a Firewall. My suspicion is that
1
1961
by: Mind Dragon | last post by:
I have an ASP application that works fine locally but when it's uploaded occasionally, I get viewstate errors. Another thing is that the viewstate for that page is disabled. There are cases where I can just refresh the page and it goes through ok <%@ Page Language="VB" EnableViewState="false" Debug="true" % The worker threads are set to...
1
1927
by: S S Venkatesh | last post by:
Hi, I'm involved in a ASP.NET web project with a web farm and load balancing(windows server 2003 ) with no afinity (no sticky sessions) and i am facing problems in view state. I get an error like this. Server Error in '/ViewState' Application. ---------------------------------------------------------------------------- ---- The...
7
1454
by: Jason | last post by:
Can anybody help on the following error : The viewstate is invalid for this page and might be corrupted. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
1
289
by: Hillary Hill | last post by:
I am getting the following error. Ths steps are 1. A Page with Datagrid and literal control. 2. View state is the default one for all the controls. (Not changed). 3. When user clicks the HTML button, I am redirecting the user to myNext.aspx page from the client side code as shown. document.frmForm.action="myNext.aspx";...
7
2116
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 webpage contains 2 dropdowns controls and I save information entered by user in ViewState variable containing array ArrayList MyCoordinates =...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5361
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.