using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Controls_Pager2 : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected override void Render(HtmlTextWriter writer)
{
LinkButton linkButton = new LinkButton();
linkButton.ID = "btnNext";
linkButton.Text = "Next";
linkButton.CommandArgument = (_pageNumber++).ToString();
linkButton.Click += btnNext_Click;
PlaceHolder1.Controls.Add(linkButton);
base.Render(writer);
}
protected void btnNext_Click(object sender, EventArgs e)
{
Response.Write("Clicked");
}
}
|