protected void gvResumeSearch_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
try
{
if (ViewState["CategoriesDataTable"] != null)
{
DataTable dt = (DataTable)ViewState["CategoriesDataTable"];
gvResumeSearch.DataSource = dt;
gvResumeSearch.PageIndex = e.NewPageIndex;
gvResumeSearch.DataBind();
}
}
catch (Exception ex)
{
lblErrMsg.Text = "Exception in gvResumeSearch_PageIndexChanging. Message: " + ex.Message;
}
}
Private void DataTable GetData()
{
DataTable newDt = //some custom method.
ViewState["CategoriesDataTable"] = newDt;
}
{
try
{
if (ViewState["CategoriesDataTable"] != null)
{
DataTable dt = (DataTable)ViewState["CategoriesDataTable"];
gvResumeSearch.DataSource = dt;
gvResumeSearch.PageIndex = e.NewPageIndex;
gvResumeSearch.DataBind();
}
}
catch (Exception ex)
{
lblErrMsg.Text = "Exception in gvResumeSearch_PageIndexChanging. Message: " + ex.Message;
}
}
Private void DataTable GetData()
{
DataTable newDt = //some custom method.
ViewState["CategoriesDataTable"] = newDt;
}
No comments:
Post a Comment