keyongtech


  keyongtech > dotnet.framework.aspnet.* > dotnet.framework.aspnet.main > 10/2004

 #1  
10-11-04, 08:08 AM
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...
 #2  
10-11-04, 09:35 AM
Praveen K
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:
[..]
 #3  
10-11-04, 09:46 AM
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

"Greg Phillips" <greg> wrote in message
news:1204
[..]
 #4  
10-11-04, 10:00 AM
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 [url down] ***
Don't just participate in USENET...get rewarded for it!
 #5  
10-11-04, 11:10 AM
Greg Phillips
Unfortunately , not for me...

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

GP


"Kannan Meiappan" <mkannan> wrote in message
news:3244
[..]
 #6  
10-11-04, 11:51 AM
Praveen K
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:
[..]
 #7  
10-11-04, 02:33 PM
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" <PraveenK> wrote in message
news:0600
[..]
 #8  
10-11-04, 03:21 PM
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.
 #9  
10-12-04, 06:35 AM
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?



"Richard Myers" <richard.spam-free.myers> wrote in message
news:3980
[..]
 #10  
10-13-04, 10:01 AM
Richard Myers
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
 #11  
10-13-04, 01:02 PM
Greg Phillips
do you know how to turn the viewstate off completly.... even if the
__viewstate variable is passed to the page?



"Richard Myers" <fake> wrote in message
news:1336
[..]
Similar Threads
Change __VIEWSTATE to something else

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

__VIEWSTATE different between localhost and server

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

ASP + Ajax + __VIEWSTATE = BAD ?

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

__VIEWSTATE

Hi all, We have a problem here regarding this __VIEWSTATE data. CMS always keep data in viewstate and the data might be very big. Our search engine will only search for the...

__VIEWSTATE data HUGE!!!

I have an application being developed and I've noticed that in most of the pages the __VIEWSTATE data is HUGE, about 4 pages full in many cases. This leads to bloated page...


All times are GMT. The time now is 01:11 AM. | Privacy Policy