Link to home
Start Free TrialLog in
Avatar of tyy8
tyy8

asked on

Raising a click event programmatically

I have an imagebutton:

cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs)

How do I raise it's click event within the code behind, specifically, what are the parameters to pass
Avatar of Yarx
Yarx

Well, the sender is whatever triggered the event. But in your case. Most people just pass in the "Me" keyword. As for the event erguments, just use "System.Web.UI.ImageClickEventArgs.Empty" Since you aren't doing anything fancy.

So it would look something like this from within your code.

cmdSubmit_Click(Me, ImageClickEventArgs.Empty)
ASKER CERTIFIED SOLUTION
Avatar of Dranizz
Dranizz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial