PC Review


Reply
Thread Tools Rate Thread

Controls state

 
 
MarcusStudentum
Guest
Posts: n/a
 
      17th Mar 2008
Hello there i was using the control state because we have disabled Viewstate
on a particular page. And i noticed that SaveControlState() is called twice.

If you put a trace.warn in SaveControlState you will see it too. It happens
on Visual 2005 and Vs 2008. I tested it on a totally clean page and it
happens there too.

I am wondering is it a bug or is it supposed to be like that? And if it
supposed to work like that, then i would like to know why?
 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      17th Mar 2008
Did you note it by turning trace on? When tracing is enabled it is called
twice to estimate the state size.


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"MarcusStudentum" <(E-Mail Removed)> wrote in
message news:157238EF-F655-43D9-9970-(E-Mail Removed)...
> Hello there i was using the control state because we have disabled
> Viewstate
> on a particular page. And i noticed that SaveControlState() is called
> twice.
>
> If you put a trace.warn in SaveControlState you will see it too. It
> happens
> on Visual 2005 and Vs 2008. I tested it on a totally clean page and it
> happens there too.
>
> I am wondering is it a bug or is it supposed to be like that? And if it
> supposed to work like that, then i would like to know why?



 
Reply With Quote
 
MarcusStudentum
Guest
Posts: n/a
 
      18th Mar 2008
Cool thanks thats really helpfull. Microsoft should write that bit of
information in
http://msdn2.microsoft.com/en-us/lib...trolstate.aspx

Now i know i should be careful not to change the State in between calls when
Trace is on. I was totally losed because this is a big page with events
firing all over the place.

Cheers
MarcusStudentum

"Teemu Keiski" wrote:

> Did you note it by turning trace on? When tracing is enabled it is called
> twice to estimate the state size.
>
>
> --
> Teemu Keiski
> AspInsider, ASP.NET MVP
> http://blogs.aspadvice.com/joteke
> http://teemukeiski.net
>
> "MarcusStudentum" <(E-Mail Removed)> wrote in
> message news:157238EF-F655-43D9-9970-(E-Mail Removed)...
> > Hello there i was using the control state because we have disabled
> > Viewstate
> > on a particular page. And i noticed that SaveControlState() is called
> > twice.
> >
> > If you put a trace.warn in SaveControlState you will see it too. It
> > happens
> > on Visual 2005 and Vs 2008. I tested it on a totally clean page and it
> > happens there too.
> >
> > I am wondering is it a bug or is it supposed to be like that? And if it
> > supposed to work like that, then i would like to know why?

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net manage state of classic asp controls. drewsdepaul@gmail.com Microsoft ASP .NET 2 16th Oct 2007 08:31 PM
Losing state on bound controls in user controls Josh Microsoft ASP .NET 1 23rd Mar 2005 03:23 PM
ASP.NET - Preserve child controls state Emil Stoev Microsoft ASP .NET 0 17th May 2004 12:02 PM
Session state and user controls Daniel Lawrence Microsoft Dot NET Framework 0 25th Mar 2004 10:07 AM
why controls keep their state even on a different page? Bisser Milanov Microsoft ASP .NET 4 14th Jul 2003 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:08 AM.