I have a placeholder that I'm adding a dynamic table to.
In one of the cells of the table, I'm trying to add a LinkButton with an OnClick event.
The LinkButton appears fine, but when I click on it, nothing happens.
Here is my code. The table gets created on Page_Load.
Any help is appreciated.
Tim
protected void Page_Load(object sender, EventArgs e)
{
CreateDynamicTable();
}
private void CreateDynamicTable()
{
// build table here....
LinkButton lbnEditAdvanceRequest = new LinkButton();
lbnEditAdvanceRequest.Text = "Edit";
lbnEditAdvanceRequest.Click += new EventHandler(lbnEditAdvanceRequest_Click);
tcValue.Controls.Add(lbnEditAdvanceRequest);
// more code
}
private void lbnEditAdvanceRequest_Click(object sender, EventArgs e)
{
Response.Write("Hello");
}
Go to the complete details ...