protected LinkButton lbl; protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { lbl = new LinkButton(); lbl.Text = "hai"; lbl.ID = "ll"; pnl.Controls.Add(lbl); lbl.Click +=new EventHandler(lbl_Click); } protected void lbl_Click(object s, EventArgs e) { Response.Write("Event Calling"); }
lbl = new LinkButton(); lbl.Text = "hai"; lbl.ID = "ll"; //this line lbl.AutoPostBack = true; pnl.Controls.Add(lbl); lbl.Click +=new EventHandler(lbl_Click);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)