__VIEWSTATE

G

Greg Phillips

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...
 
G

Guest

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.
 
K

Kannan Meiappan

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
 
G

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
 
G

Greg Phillips

Unfortunately , not for me...

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

GP
 
G

Guest

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

Greg Phillips

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 said:
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 said:
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
 
S

Scott Allen

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.
 
G

Greg Phillips

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?
 
G

Greg Phillips

do you know how to turn the viewstate off completly.... even if the
__viewstate variable is passed to the page?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top