473,397 Members | 1,974 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,397 software developers and data experts.

__VIEWSTATE

I have a page, with an iframe in it.
the iframe loads up another ASPX page, I have set both pages
enableviewstate=false

The problem is, if I click on anything on the main page, it gives me a
viewstate corrupt error,

How do I turn the viewstate checking of these pages off completely...
Nov 18 '05 #1
10 2734
Hi Greg in the page attribute where you ahve specified EnableViewState=false;
also set the EnableViewStateMac=false.

Microsoft says The EnableViewStateMac is not intended to be used directly
from your code. as .Net framework takes care about it. but in realistic
scenario it doesn't seems so. u need to set this to false, as it will create
some problem majorily when you are disabling Viewstate and sometimes also
working with Crystal Reports.

Hope this helps you out.
"Greg Phillips" wrote:
I have a page, with an iframe in it.
the iframe loads up another ASPX page, I have set both pages
enableviewstate=false

The problem is, if I click on anything on the main page, it gives me a
viewstate corrupt error,

How do I turn the viewstate checking of these pages off completely...

Nov 18 '05 #2
hi,

When you include an .aspx file within another .aspx file, actually it works
fine...no need to set any viewstate property for that explicitly...

regards,
Kannan

"Greg Phillips" <gr**@flock.co.za> wrote in message
news:e4**************@TK2MSFTNGP12.phx.gbl...
I have a page, with an iframe in it.
the iframe loads up another ASPX page, I have set both pages
enableviewstate=false

The problem is, if I click on anything on the main page, it gives me a
viewstate corrupt error,

How do I turn the viewstate checking of these pages off completely...

Nov 18 '05 #3
G P
Hi Praveen
thanks for the reply... i tried your advice, though i get this error
now...

Specified cast is not valid.
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: System.InvalidCastException: Specified cast is not
valid.

Source Error:

An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
System.Web.UI.Page.LoadPageViewState() +30
System.Web.UI.Page.ProcessRequestMain() +423

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4
Unfortunately , not for me...

Is there a way to override a method to not load up the viewstate...

GP
"Kannan Meiappan" <mk*****@scapevelocity.com> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
hi,

When you include an .aspx file within another .aspx file, actually it
works
fine...no need to set any viewstate property for that explicitly...

regards,
Kannan

"Greg Phillips" <gr**@flock.co.za> wrote in message
news:e4**************@TK2MSFTNGP12.phx.gbl...
I have a page, with an iframe in it.
the iframe loads up another ASPX page, I have set both pages
enableviewstate=false

The problem is, if I click on anything on the main page, it gives me a
viewstate corrupt error,

How do I turn the viewstate checking of these pages off completely...


Nov 18 '05 #5
Hi Greg, I dont this is a problem because of the ViewState, this is because
youa re trying to cast a object which is not supported check your code this
time. or load the lines where you are facing this problem.

"G P" wrote:
Hi Praveen
thanks for the reply... i tried your advice, though i get this error
now...

Specified cast is not valid.
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: System.InvalidCastException: Specified cast is not
valid.

Source Error:

An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
System.Web.UI.Page.LoadPageViewState() +30
System.Web.UI.Page.ProcessRequestMain() +423

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #6
Hi Praveen

Thanks for the feedback... though i am not recieving an exception from my
code, the stack trace shows that the exception is thrown in
ProcessRequestMain
...

is there a way for me to override some function that will not let the
viewstate be loaded... load nothing..

GP

"Praveen K" <Pr******@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
Hi Greg, I dont this is a problem because of the ViewState, this is
because
youa re trying to cast a object which is not supported check your code
this
time. or load the lines where you are facing this problem.

"G P" wrote:
Hi Praveen
thanks for the reply... i tried your advice, though i get this error
now...

Specified cast is not valid.
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: System.InvalidCastException: Specified cast is not
valid.

Source Error:

An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
System.Web.UI.Page.LoadPageViewState() +30
System.Web.UI.Page.ProcessRequestMain() +423

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #7
Hi GP:

You can override SavePageStateToPersistenceMedium and
LoadPAgeStateFromPersistanceMedium. If you google for these methods
you'll even find some articles where people keep viewstate on the
server side.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 11 Oct 2004 12:10:36 +0200, "Greg Phillips" <gr**@flock.co.za>
wrote:
Unfortunately , not for me...

Is there a way to override a method to not load up the viewstate...

GP
"Kannan Meiappan" <mk*****@scapevelocity.com> wrote in message
news:OM**************@tk2msftngp13.phx.gbl...
hi,

When you include an .aspx file within another .aspx file, actually it
works
fine...no need to set any viewstate property for that explicitly...

regards,
Kannan

"Greg Phillips" <gr**@flock.co.za> wrote in message
news:e4**************@TK2MSFTNGP12.phx.gbl...
I have a page, with an iframe in it.
the iframe loads up another ASPX page, I have set both pages
enableviewstate=false

The problem is, if I click on anything on the main page, it gives me a
viewstate corrupt error,

How do I turn the viewstate checking of these pages off completely...



Nov 18 '05 #8
No not at all...

Currently its being developed on my local machine, and when it moves to
production it shall be on a single machine...

whats your idea with the viewstate?

"Richard Myers" <ri*********************@basd.co.nz> wrote in message
news:On**************@TK2MSFTNGP12.phx.gbl...
Are you serving your application out in a shared hosting
environment.webfarm?

Nov 18 '05 #9
Well i was thinking something like this

http://support.microsoft.com/default...b;en-us;323744

but it doesn't seem to apply. It seems a shame to have to turn off the
viewstate rather than identify the root cause of the problem.

Richard

Nov 18 '05 #10
do you know how to turn the viewstate off completly.... even if the
__viewstate variable is passed to the page?

"Richard Myers" <fa**@address.com> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
Well i was thinking something like this

http://support.microsoft.com/default...b;en-us;323744

but it doesn't seem to apply. It seems a shame to have to turn off the
viewstate rather than identify the root cause of the problem.

Richard

Nov 18 '05 #11

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

Similar topics

2
by: Me | last post by:
Is there anyway to control the style/layout of this field? ..NET doesn't generate an ID for it so you can create a style for it or manipulate it in code. I've looked on MSDN etc. but can't...
10
by: Jason Pettys | last post by:
I have an ASP.NET page that my client wants to e-mail. So in IE we choose File > Send > Page by E-mail, which opens up either Outlook or Outlook Express with the HTML page content as the message...
2
by: GTi | last post by:
I have a ASP 2.0 page where I use some Ajax code. The Ajax code (JavaScript) is inserted from CodeBehind. In my page I have a submit button and some links for Ajax functions. When I load the page...
0
by: msnews.microsoft.com | last post by:
I have been raking my brains on why this does not work. I get back the same login screen again instead of the home page redirection which should occur after a successful login: 'create a cookie...
1
by: Eric | last post by:
Hello, I was testing my application on my localhost, when I View Source, I see the __VIEWSTATE and its only small in size (about 500 bytes). When I copy this same application over to our IIS...
0
by: reju | last post by:
Hi, I am not using view state.I disabled the view state, but this hidden __VIEWSTATE variable and some text is coming when we are taking the view source.Is there any way to remove this variable?...
7
by: reju | last post by:
Hi, I am not using view state.I disabled the view state, but this hidden __VIEWSTATE variable and some text is coming when we are taking the view source.Is there any way to remove this variable?...
6
by: Ivan Gasparetto | last post by:
Is it possible to change the __VIEWSTATE id? The reason is we shouldn't have any id starting with underscores on XHTML pages. Thank you
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
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...
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,...

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.