Given a web form with an Image Button and Link Button, both, when clicked, will re-direct the user to the main.aspx web form.
To achieve this goal I wanted to have both the Image Button and Link Button using the same function [OnClick = Enter_Click in html] which I created as public void Enter_Click(object sender, System.EventArgs e) which generated the following error, Method 'TEST.WebForm1.Enter_Click(object, System.EventArgs)' does not match delegate 'void System.Web.UI.ImageClickEventHandler(object, System.Web.UI.ImageClickEventArgs)' for the image button.
However if I use the one provided above it fails for my link button instead with a similar error except requested that I use System.EventArgs e, is there no way to do this in one function or must I write 2 separate ones, one for the Image Button and one for the Link Button (with the only difference being the Event Argument passed in)?
To achieve this goal I wanted to have both the Image Button and Link Button using the same function [OnClick = Enter_Click in html] which I created as public void Enter_Click(object sender, System.EventArgs e) which generated the following error, Method 'TEST.WebForm1.Enter_Click(object, System.EventArgs)' does not match delegate 'void System.Web.UI.ImageClickEventHandler(object, System.Web.UI.ImageClickEventArgs)' for the image button.
However if I use the one provided above it fails for my link button instead with a similar error except requested that I use System.EventArgs e, is there no way to do this in one function or must I write 2 separate ones, one for the Image Button and one for the Link Button (with the only difference being the Event Argument passed in)?