Questions tagged [page-lifecycle]

When a page is requested on the web the server goes through a number of stages before sending back a response. Thus, the page life cycle is runs between request to response on the server.

Main steps in lifecycle are:

  1. Page request
  2. Start
  3. Initialization
  4. Load
  5. Postback event handling (if it is a postback request)
  6. Rendering
  7. Unload

More information: http://msdn.microsoft.com/en-us/library/ms178472.aspx

471 questions
11
votes
2 answers

jQuery Mobile -> Page Lifecycle?

Is there something like a lifecycle for jQuery Mobile pages? Like events that get fired on init, show, hide/back, or whatever events?! Thanks in advance!
Nik
  • 2,863
  • 6
  • 24
  • 29
11
votes
2 answers

ViewState Chunking in asp.net

I keep on hearing this words "Viewstate Chunking". What is Viewstate Chunking? And how it is working for ASP.NET pages?
Sujit
  • 3,677
  • 9
  • 41
  • 50
10
votes
2 answers

Difference with creating and adding controls in PreInit Init

There's tons of info on the web about the ASP.NET life cycle, but i can't seem to figure out when to dynamically add controls to the page. In general there are two situations; an aspx page with a masterpage, and one without. The book i'm currently…
Peanutbag
  • 277
  • 1
  • 4
  • 11
10
votes
3 answers

ASMX equivalent of Page_Init?

I have some code I would like to execute very early in the lifecycle of a call to an ASMX function. For our ASPX pages, this code is in the Page_Init() function on a base class, from which all our ASPX pages inherit. Is there an ASMX equivalent to…
mikemanne
  • 3,535
  • 1
  • 22
  • 30
10
votes
3 answers

ASP.NET Repeater ItemDataBound happening AFTER PreRender event?

I have a repeater control on an ASP.NET 2.0 web form. As I understanding it, all of the page's data-bound controls fire their binding events somewhere in between the Page_Load and the Page_PreRender events. However, my repeater's ItemDataBound…
Matias Nino
  • 4,265
  • 13
  • 46
  • 63
9
votes
3 answers

Page_Load vs OnLoad

Why DisplayUsers(); doesn't work? My base page is: public class adminPage : System.Web.UI.Page { protected override void OnLoad(EventArgs e) { if (User.Identity.IsAuthenticated == false) {…
eyalb
  • 2,994
  • 9
  • 43
  • 64
8
votes
2 answers

where is session state, application state in page life cycle?

where is session state, application state in page life cycle?
sly_Chandan
  • 3,437
  • 12
  • 54
  • 83
8
votes
1 answer

Flutter : How to navigate to new page after state change?

How to navigate to new page after state change? I had an app that require login first. Only after login, the app component are fully created. So I wrote something like this: Main app class AppComponentState extends State implements…
Kyaw Tun
  • 12,447
  • 10
  • 56
  • 83
8
votes
3 answers

handle event before Page_Load

I have an asp.net web page with a ton of code that is handled in the Page-Load event of the page. I also have a dropdown box on the page that should reload the page with a new value, but I would like to get this new value before I process the…
zkent
  • 980
  • 1
  • 10
  • 22
8
votes
1 answer

In what situation Application_EndRequest is called but Application_BeginRequest is not called?

The expected order of HttpApplication methods is: Application_Start Init Application_BeginRequest Application_AuthenticateRequest (page life cycle) Application_EndRequest I'm passing through a situation, which throws absolutely no exception, in…
Andre Pena
  • 56,650
  • 48
  • 196
  • 243
7
votes
2 answers

How to detect if browser is in the process of loading a new page

I have a web app with some 'safety' code which causes a page reload if the server (Socket.IO) connection goes silent for more than 5 seconds (generally customer site firewall/broken-proxy issues). The Socket.IO connection stops as soon a new page…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
7
votes
4 answers

Disabling a submit button after one click

Here's my code :
GregM
  • 2,634
  • 3
  • 22
  • 37
7
votes
7 answers

What do you do when you can't use ViewState?

I have a rather complex page that dynamically builds user controls inside of a repeater. This repeater must be bound during the Init page event before ViewState is initialized or the dynamically created user controls will not retain their…
FlySwat
  • 172,459
  • 74
  • 246
  • 311
7
votes
1 answer

Page_PreInit not called?

Im running an ASP.NET 4.0 project. The .aspx page has AutoEventWireup="true" set in the header. Although OnPreInit is called, Page_PreInit is not? Can anyone suggest what is wrong? protected void Page_PreInit(object sender, EventArgs e) { …
maxp
  • 24,209
  • 39
  • 123
  • 201
7
votes
4 answers

ASP.NET- forcing child/container events to fire before parent onload?

I'm working on a questionnaire type application in which questions are stored in a database. Therefore, I create my controls dynamically on every Page.OnLoad. This works like a charm and ViewState is persisted between postbacks because I ensure…
Hans Gruber
  • 271
  • 1
  • 10
1
2
3
31 32