twice method executing

Discussion in 'ASP .Net' started by Op, Nov 22, 2008.

  1. Op

    Op Guest

    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
     
    Op, Nov 22, 2008
    #1
    1. Advertising

  2. Op

    Hillbilly Guest

    if(!Page.IsPostBack)
    {
    // code here only executed first time page is compiled
    }

    "Op" <> wrote in message news:gg7k3o$73m$...
    > 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
     
    Hillbilly, Nov 23, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mart

    Page-load executing twice

    mart, Aug 27, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,193
    nfedin
    Aug 27, 2003
  2. Raterus
    Replies:
    2
    Views:
    395
    portal33
    Jul 20, 2006
  3. =?Utf-8?B?RGFiYmxlcg==?=

    SelectedIndexChanged method executing twice?

    =?Utf-8?B?RGFiYmxlcg==?=, Aug 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,201
    =?Utf-8?B?RGFiYmxlcg==?=
    Aug 20, 2006
  4. tshad

    SaveViewState executing twice

    tshad, Aug 25, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    806
    tshad
    Aug 30, 2006
  5. Kiuhnm

    twice(twice(x))

    Kiuhnm, Apr 1, 2006, in forum: C++
    Replies:
    2
    Views:
    395
    Kiuhnm
    Apr 1, 2006
Loading...

Share This Page