Page_load event cannot be fired

G

Guest

What is the possible error that occurs when the Page_load event is not triggered during execution.

In my page there's some basic server control. Is there any loops holes?
 
H

Hermit Dave

Okay Session could be used across multiple worker processes but you have to set the session vars to be stored in State Server or Sql Server

nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet/<[email protected]>

Charlie,

There are a couple of ways to store information.

ViewState is most frequently used one cause there aren't excessive server overheads and the data is on client which is posted back

Storing in Session could be another way but again this would only work in a scenario where your application runs off a single aspnet worker process.

I had an interesting scenario where I did not want to keep the data in session (time out would sort of release the values) and I ended up creating a Cookie class to store some values (like say the selected item text for a dropdownlist and created a singleton which return client specific data using HttpContext.Current)



It works great but you have to sort of balance whether you really need that sort of implementation. Anything you do has atleast some overhead attached to it.

You could potentially even store it in database. But again you are looking at a db call to retrieve data.



Regards,



HD



From:Charlie [mailto:[email protected]]
Posted At: 07 March 2004 07:33
Posted To: aspnet
Conversation: Persisting State Information
Subject: Persisting State Information


nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.aspnet/<[email protected]>

Hi,

Is there a way of persisting state information for a server control
without using ViewState? I'm currently using Page.Session() but I
don't think this is the best way. What's the preferred method?

Thanks
Charlie




[microsoft.public.dotnet.framework.aspnet]
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top