public void GeneratePaginationBar()
{
this.pnlPageBar.Controls.Clear();
for(int i=1;i<6;i++)
{
System.Web.UI.WebControls.LinkButton lbtPage = new LinkButton();
lbtPage.ID=i.ToString();
lbtPage.CommandName="Page";
lbtPage.CommandArgument=i.ToString();
lbtPage.Text=i.ToString();
lbtPage.Enabled=true;
lbtPage.Command += new System.Web.UI.WebControls.CommandEventHandler(this.lbtPage_Click);
this.pnlPageBar.Controls.Add(lbtPage);
this.pnlPageBar.Controls.Add(new LiteralControl("<br>"));
}
}
private void lbtPage_Click(object sender, System.Web.UI.WebControls.CommandEventArgs e)
{
// BindData();
}
{
this.pnlPageBar.Controls.Clear();
for(int i=1;i<6;i++)
{
System.Web.UI.WebControls.LinkButton lbtPage = new LinkButton();
lbtPage.ID=i.ToString();
lbtPage.CommandName="Page";
lbtPage.CommandArgument=i.ToString();
lbtPage.Text=i.ToString();
lbtPage.Enabled=true;
lbtPage.Command += new System.Web.UI.WebControls.CommandEventHandler(this.lbtPage_Click);
this.pnlPageBar.Controls.Add(lbtPage);
this.pnlPageBar.Controls.Add(new LiteralControl("<br>"));
}
}
private void lbtPage_Click(object sender, System.Web.UI.WebControls.CommandEventArgs e)
{
// BindData();
}