In ASP.Net, I am trying to create a WebControl. In this control, I have RenderControl method overridden with my html controls.
protected override void RenderContents(HtmlTextWriter output)
{
output.Write(@"<table><tr><td>");
output.Write(@"<input type=""submit"" name=""btnExecute"" value=""Execute"" id=""btnExecute"" />");
output.Write(@"</td></tr></table>");
}
How can I make the button call the click event so that the server side method btnExecute_Click() can be called? Also, this button calls a javascript function before server side even.
Please suggest how to make it work.