P
Prince
I'm doing the following but I'm not sure if there is a
more efficient way to accomplish the same thing.
In my Page_Load() method, I accessed a database and
stored the information inside a DataSet. On my webpage,
I have a DataList server control that binds to the
DataSet. The method looks something like the following:
Page_Load(){
//do the database connection plus binding
if( !this.IsPostBack ){
this.DataBind();
}
else{
this.DataListServerControl.DataBind();
}
This means that everytime the page loads, it has to
access the database then re-bind. Is this the best way
to do this?
-- Prince
more efficient way to accomplish the same thing.
In my Page_Load() method, I accessed a database and
stored the information inside a DataSet. On my webpage,
I have a DataList server control that binds to the
DataSet. The method looks something like the following:
Page_Load(){
//do the database connection plus binding
if( !this.IsPostBack ){
this.DataBind();
}
else{
this.DataListServerControl.DataBind();
}
This means that everytime the page loads, it has to
access the database then re-bind. Is this the best way
to do this?
-- Prince