473,473 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sequence of code processing

I am fairly new to ASP.Net and am using VS2005 and .Net 2.0 for page
creation. I am using VB as a language and have VB code between script tags
at the top of my page. I also have a button on my page that runs a
Protected Sub that performs some processing when clicked as noted below:

Protected Sub BtnNewSubfile_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnNewSubfile.Click

....

End Sub

Does this code run before the code at the top of the page or after. Or does
the code at the top of the page run at all when I click the button? Thanks.

David
Oct 18 '06 #1
2 1095
David,
ASP.Net doesn't run in a linear fashion as classic ASP did. It's
completely event-driven. That means your button click event will be fired at
a particular time based on the design of ASP.Net, not based upon the
location of the code. Paul Wilson has a great article listing all the
various events that will occur on a page and the order in which they occur
at: http://blogs.crsw.com/mark/articles/471.aspx

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"David" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>I am fairly new to ASP.Net and am using VS2005 and .Net 2.0 for page
creation. I am using VB as a language and have VB code between script tags
at the top of my page. I also have a button on my page that runs a
Protected Sub that performs some processing when clicked as noted below:

Protected Sub BtnNewSubfile_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnNewSubfile.Click

...

End Sub

Does this code run before the code at the top of the page or after. Or
does the code at the top of the page run at all when I click the button?
Thanks.

David

Oct 19 '06 #2
Thank you Mark. I'll check it out.

David
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
David,
ASP.Net doesn't run in a linear fashion as classic ASP did. It's
completely event-driven. That means your button click event will be fired
at a particular time based on the design of ASP.Net, not based upon the
location of the code. Paul Wilson has a great article listing all the
various events that will occur on a page and the order in which they occur
at: http://blogs.crsw.com/mark/articles/471.aspx

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"David" <dl*****@lifetimeinc.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>I am fairly new to ASP.Net and am using VS2005 and .Net 2.0 for page
creation. I am using VB as a language and have VB code between script
tags at the top of my page. I also have a button on my page that runs a
Protected Sub that performs some processing when clicked as noted below:

Protected Sub BtnNewSubfile_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BtnNewSubfile.Click

...

End Sub

Does this code run before the code at the top of the page or after. Or
does the code at the top of the page run at all when I click the button?
Thanks.

David


Oct 19 '06 #3

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

Similar topics

4
by: Paul Rubin | last post by:
I have a file with contents like: Vegetable: spinach Fruit: banana Flower: Daisy Fruit: pear
2
by: Dave Theese | last post by:
Hello all, I have read the definition of a sequence point in the standard and can follow it mechanically, but for some reason, I'm having a hard time grasping the conceptual meaning and...
6
by: Randy Harris | last post by:
Anyone know if there is an Event that occurs when you open a form AFTER it is visible on the screen? I've tried Open, Activate, Load, Current, Got Focus. None of them do. ???
7
by: urban.widmark | last post by:
Hello We are having some problems with triggers, sequences and union all in V8 on code that worked fine in V7. Was wondering if someone else has seen this and/or knows what to do. A trigger...
0
by: Jaco Smuts | last post by:
Hello there question: I'm looking for information / patterns / recipe's for implementing a multi threaded program (multiple producers / consumers) that will manage transactions and maintain...
4
by: bboyle18 | last post by:
Hi, I am working with a table sorting script which can be found here http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting This script works very nicely, but when there is a...
13
by: michael sorens | last post by:
I have a lengthy sequence of operations that are executed and reported on in a status window in a Windows Form application. Some work is done by background threads but other work is not. I am...
5
by: majestik666 | last post by:
Am not sure if it's been asked before (did a search but didn't come up with anything related...). I'm trying to write some code to "collapse" image sequences into a single item , i.e.:...
0
by: wmos4995 | last post by:
Hi, I am writing a procedure to alter the value of a sequence to max value of the table column. This is what i have written till now. CREATE PROCEDURE RESET_SEQ ( IN TABNAME VARCHAR(50),...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.