Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Sequence of events on a web form

Thread Tools

Re: Sequence of events on a web form

Craig Deelsnyder
Posts: n/a
Page_Load is run on every page load or postback. Remember the web is
stateless, so ASP.NET, when a request comes in, it creates the corresponding
Page class/object for whatever page was requested. It then runs the
Page_Load event and continues from there.

If there's some processing you want done only once (when the page is first
loaded from the user's perspective), add a check for IsPostBack in the
Page_Load event....

If Not IsPostBack then
'//do some initial page loading, maybe setup your table, bind datasources,
End If

Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

"John Black" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I am a little confused about the sequence of events on a webform. I am

> through the MCAD/MCSE certification book for .NET programming from
> Microsoft. Chapter 5 is the database chapter. I am trying to bind a

> to the datasource after updating the dataset. I just investigated the best
> place to put the dataset.update command and have discovered that my
> Page_Load event gets fired immediately after clicking the "AddRow" button

> have on my web form. Does anyone else have the same problem?
> Paul

Reply With Quote

Thread Tools

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
how to iterate over sequence and non-sequence ? stef mientki Python 13 10-20-2007 10:21 AM
Tomcat and sequence of events Java 2 12-05-2005 12:18 AM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Sequence of events John Spiegel ASP .Net 4 01-03-2005 03:30 PM
BOOT SEQUENCE (how to change boot sequence) bird Computer Support 13 12-24-2003 02:20 AM