In my webform I created button from my code behind:
Button btnShowCase = new Button();
btnShowCase.ID = "btnShowCase_" + ticketNumber;
btnShowCase.CssClass = "BtnShowCase";
btnShowCase.Text = "Display";
btnShowCase.OnClientClick = "ShowCase";
On client click I want to execute function
protected void ShowCase(object sender, EventArgs e)
{
Do something
}
OnClientClick do not call ShowCase. What I am doing wrong?