StatCounter

View My Stats

Tuesday, February 5, 2008

Reduce the Bandwidth Suffer in .NET

Reduce the Bandwidth Suffer in .NET


While using a complex control like GridView, Repeater ,DetailsView control We have to Disable the ViewState.......Otherwise it degrades the Bandwidth of your connection.

To overcome this :
Page Load
if(!Page.IsPostBack)
{
BindGrid();
}

Instead of that use:(Directly BindGrid)
Page Load
BindGrid();

The disadvantages of this Method is the Evets of the controls like RowCommand Wont Work.Check this out Properly

Use directly at the Page Load. This al so the performance issue.But for comparing the above this give some better performance.

No comments: