Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > twice method executing

Reply
Thread Tools

twice method executing

 
 
Op
Guest
Posts: n/a
 
      11-22-2008
Hi,

In my page I set debbuging point in "onLoad" method.
When I do any post back in my page, I can see, that "onLoad" method is
executting twice.

How can I check if the method is executing first or second time ?

(I used ViewState to check it, is there any smarter solution ?)

Thanks for help

 
Reply With Quote
 
 
 
 
Hillbilly
Guest
Posts: n/a
 
      11-23-2008
if(!Page.IsPostBack)
{
// code here only executed first time page is compiled
}

"Op" <(E-Mail Removed)> wrote in message news:gg7k3o$73m$(E-Mail Removed)...
> Hi,
>
> In my page I set debbuging point in "onLoad" method.
> When I do any post back in my page, I can see, that "onLoad" method is
> executting twice.
>
> How can I check if the method is executing first or second time ?
>
> (I used ViewState to check it, is there any smarter solution ?)
>
> Thanks for help


 
Reply With Quote
 
 
 
Reply

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
SaveViewState executing twice tshad ASP .Net 7 08-29-2006 11:10 PM
SelectedIndexChanged method executing twice? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 0 08-20-2006 06:12 AM
Re: Query Executing twice in Datagrid! Raterus ASP .Net 2 07-20-2006 06:45 AM
twice(twice(x)) Kiuhnm C++ 2 04-01-2006 04:41 PM
Page-load executing twice mart ASP .Net 2 08-27-2003 06:13 PM



Advertisments