473,516 Members | 3,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page_load event cannot be fired

lim
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?
Nov 18 '05 #1
1 1645
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/<eB**************@TK2MSFTNGP11.phx.gbl>

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:br*****@hotmail.com]
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/<85*************************@posting.google.com>

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]
Nov 18 '05 #2

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

Similar topics

3
3932
by: Stevie_mac | last post by:
It might be me but... I dont seem to get a Page_Load event when a opening an ASPX in an iFrame. I do geta Page_Load event when an item on the ASPX (inside the iFrame) is clicked but then IsPostBack=False by now!. The ASPX is opened via client side script (into an iFrame) inside a .HTM file (as ASPX postback causes problems in a modal...
4
3356
by: Alfons Puig | last post by:
Some pages (not all the pages, but I can't observe differences) opened from javascript via window.showModalDialog() doesn't fire the codebehind Page_Load event the second (and further) time it is opened from the same window. If I change the IE configuration of the temporary internet files to check new versions every time the page is called...
4
3948
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques was endeavoring to create a custom user control to make things a bit simpler, but she noticed that her Page_Load eventhandler was firing twice. So...
0
938
by: Joergen Bech | last post by:
Scenario: One editnews.aspx page used for editing various types of news, e.g. editnews.aspx?NewsType=Business editnews.aspx?NewsType=Fans Trouble is: There is a combobox on this page, which is being initialized in the Page_Load event (If Not Page.IsPostBack Then ...). For one type, 10 items might be loaded into the box. For another,...
2
1866
by: John Dalberg | last post by:
I need to know what happens after Page_load has finished so I put a breakpoint at the last statement. However after stepping into after this last statement, the app continues running without the debugger. Why can't I single step until the screen has fully rendered? -- John Dalberg
6
1780
by: ad | last post by:
Hi, What is the difference between Page_init and Page_Load event?
0
1432
by: Artur | last post by:
After trying to solve this, I noticed another strange thing. When in secure connection Page_Load method of page is not invoked (Load event not fired). I looked where this method is assigned to this event, it's in On_Init method. Tested, this method is not invoked too. This happens only in when in SSL. Can anyone help me? Thanks. Artur
1
2951
by: rockdale | last post by:
Hi, I have a masterpage and on the page_load event I Populate my mainmenu from database. I the page_load event of my content, I am trying to programmly select the menuitem that represent current content page, but as you know, the page_load event is fired backward, the content page_load fires first then followed by the master page...
2
2719
by: Michal Valent | last post by:
I would like to fire some custom server control event before Page_Load event like this (from the trace of an aspx page) : Trace Information Category Message From First(s) From Last(s) aspx.page Begin PreInit aspx.page End PreInit 5,38454603734274E-05 0,000054 aspx.page Begin Init 8,96405962016187E-05 0,000036 aspx.page End Init...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7405
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7547
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5712
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3265
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1620
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.