Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...