i have came across many pre written asp.net web apps and many opensource asp.net web apps.
some where i had found
page_load()
{
if(!IsPostBack)
{
//code logic
}
}
where some other sites i had found
page_load()
{
if(IsPostBack) return;
//code logic
}
my question is which one of this is better code standard and which one of these is more performance.
There is no performance impact because the condition will be executed in both examples and the compiler may optimize the code anyway. It's just a matter of taste. The second one:
is known as a "Guard Clause". Read more at wiki.c2.com/?GuardClause.