ASP.NET Performance Tips
page 14 of 19
by Adiseshu Dasari
Feedback
Average Rating: 
Views (Total / Last 10 Days): 75217/ 143

Avoid Using Page.DataBind, instead call data bind on specific control

Calling Page.DataBind invokes the page-level method. The page-level method in turn calls the DataBind method of every control on the page that supports data binding. Instead of calling the page-level DataBind, call DataBind on specific controls. Both approaches are shown in the following examples.

The following line calls the page level DataBind. The page level DataBind in turn recursively calls DataBind on each control.

Listing 9

DataBind();

The following line calls DataBind on the specific control.

Listing 10

yourServerControl.DataBind();

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





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


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-18 2:07:23 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search