473,465 Members | 4,339 Online
Bytes | Software Development & Data Engineering Community
Create 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 2575
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****************@TK2MSFTNGP10.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.transfers 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.QueryString["fromPage"]=="Search")
{
Page pageThatTransferredToMe = (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****************@TK2MSFTNGP10.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
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...
4
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...
2
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...
5
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...
1
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...
1
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...
7
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...
1
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...
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.