Click event of LinkButton doesn't call when i add it from code behind

lalkdealmox

New Member
I use below code for set click to \[code\]LinkButton\[/code\] but doesn't call the event,when i click on linkbutton,it 's hiding\[code\]LinkButton lnk = new LinkButton();lnk.Text = "....";lnk.Click+=new EventHandler(lnk_Click);pnl.Controls.Add(lnk); // pnl is Panel in GridView's cell//eventprotected void lnk_Click(object sender, EventArgs e){ //...}\[/code\]
 
Back
Top