Effect

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9u?=, Aug 26, 2005.

  1. Hello all,

    I'm just wondering about the following code example:

    if (Page.IsPostBack == false)
    {
    // Put user code to initialize the page here
    }

    It's basically a blank method on the page load, which as you can see does
    nothing. I was wondering if there are any impliactions (apart from totally
    pointless) of doing this? Does it affect the processor time etc?

    Thanks all,

    Jon
     
    =?Utf-8?B?Sm9u?=, Aug 26, 2005
    #1
    1. Advertising

  2. Hi,

    Enable trace on the webpage and see yourself. In my machine time spent on
    calling load event’s delegate is about 0.000026s. Remember this event is
    raised just once per request, therefore it should not be a serious
    implication for application’s performance.

    Milosz Skalecki
    MCP, MCAD

    "Jon" wrote:

    > Hello all,
    >
    > I'm just wondering about the following code example:
    >
    > if (Page.IsPostBack == false)
    > {
    > // Put user code to initialize the page here
    > }
    >
    > It's basically a blank method on the page load, which as you can see does
    > nothing. I was wondering if there are any impliactions (apart from totally
    > pointless) of doing this? Does it affect the processor time etc?
    >
    > Thanks all,
    >
    > Jon
     
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=, Aug 26, 2005
    #2
    1. Advertising

  3. What you're looking at is a placeholder for your code which comes from a
    Template. You may delete it if you like. The use of Templates in various
    Microsoft programming IDEs is a time-saving way of writing the boiler-plate
    code that is typically written by any develper. It is there for your
    convenience.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Paranoia is just a state of mind.

    "Jon" <> wrote in message
    news:...
    > Hello all,
    >
    > I'm just wondering about the following code example:
    >
    > if (Page.IsPostBack == false)
    > {
    > // Put user code to initialize the page here
    > }
    >
    > It's basically a blank method on the page load, which as you can see does
    > nothing. I was wondering if there are any impliactions (apart from totally
    > pointless) of doing this? Does it affect the processor time etc?
    >
    > Thanks all,
    >
    > Jon
     
    Kevin Spencer, Aug 29, 2005
    #3
    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. SEWilson

    Re: Flickering effect

    SEWilson, Aug 23, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,100
    SEWilson
    Aug 23, 2003
  2. chan
    Replies:
    1
    Views:
    3,793
    Nico Debeuckelaere
    Mar 4, 2004
  3. John E. Jardine

    s/// has apparent side effect on grep()

    John E. Jardine, Apr 12, 2004, in forum: Perl
    Replies:
    2
    Views:
    470
    John Jardine
    Apr 13, 2004
  4. Ryan McLean

    Problem with .aspx chenges taking effect

    Ryan McLean, Nov 18, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    329
    Ryan McLean
    Nov 26, 2003
  5. kai
    Replies:
    9
    Views:
    768
Loading...

Share This Page