ASP.NET Performance Tips
page 12 of 19
by Adiseshu Dasari
Feedback
Average Rating: 
Views (Total / Last 10 Days): 76716/ 224

Using Page.IsPostBack to Minimize Redundant Processing

Use the Page.IsPostBack property to ensure that you only perform page initialization logic when a page is first loaded and not in response to client postbacks. The following code fragment shows how to use the Page.IsPostBack property.

Listing 8

if (!Page.IsPostBack) //IsPostBack property will be false for the first time
{
  //load the dataset for the first time
}
else               
{
  //use the loaded dateset for other post back requests
}

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2020 ASPAlliance.com  |  Page Processed at 2020-08-08 10:10:06 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search