Effect

G

Guest

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
 
G

Guest

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
 
K

Kevin Spencer

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top