Home All Groups Group Topic Archive Search About

page postback related

Author
12 Dec 2006 12:11 PM
AVL
Hi,
I'm newbie to .net..I need some info.
How does asp.net recognize if a page is requested for teh first time or is
it a postback?

Author
12 Dec 2006 6:01 PM
Rad [Visual C# MVP]
On Tue, 12 Dec 2006 04:11:02 -0800, AVL wrote:

> Hi,
> I'm newbie to .net..I need some info.
> How does asp.net recognize if a page is requested for teh first time or is
> it a postback?

Wrap your code on the page load as follows:

if not Page.IsPostBack
'
' The page is requested for the first time.
' Do the stuff for loading the first time
'
else
'
' It is a postback. Run your logic
'
end if

AddThis Social Bookmark Button