/* This works well when commandHTML is of type="submit" or "image". According to the strategies table under "Handling a Click Event in Client and Server Code" in "ASP.NET Server Control Event Model" under "Visual Basic and Visual C# Concepts." */ protected System.Web.UI.WebControls.Button commandServer; protected System.Web.UI.HtmlControls.HtmlInputButton commandHTML;
private void commandHTML_ServerClick(object Source, EventArgs e) { Response.Write("commandHTML_ServerClick"); } private void commandServer_Click(object Source, EventArgs e) { Response.Write("commandServer_Click"); } private void Page_Load(object sender, System.EventArgs e) { commandHTML.ServerClick +=new EventHandler(commandHTML_ServerClick); commandServer.Click +=new EventHandler(commandServer_Click); }