D
djc
I have a subroutine that is used in a few places within a page. It is
declared with no parameters like so:
Sub subName()
End Sub
I would now also like to call this same sub from a button click using
OnClick or OnComand. However each of those require there own signature such
as:
Sub SubName(sender As Object, e As System.EventArgs) etc..
End Sub
If I don't have the right signiture I get a compile error. Then, if I add
the signature I get a compile error when this sub is called from other
places besides the button's event.
error with signature:
Argument not specified for parameter 'e' of 'Public Sub
ResetDynamicControls(Sender As Object, e As System.EventArgs)
error without signiture:
Method 'Public Sub ResetDynamicControls()' does not have the same signature
as delegate 'Delegate Sub EventHandler(sender As Object, e As
System.EventArgs)'
How can I use/call the same subroutine both from a button's event AND other
places such as within other subroutines?
declared with no parameters like so:
Sub subName()
End Sub
I would now also like to call this same sub from a button click using
OnClick or OnComand. However each of those require there own signature such
as:
Sub SubName(sender As Object, e As System.EventArgs) etc..
End Sub
If I don't have the right signiture I get a compile error. Then, if I add
the signature I get a compile error when this sub is called from other
places besides the button's event.
error with signature:
Argument not specified for parameter 'e' of 'Public Sub
ResetDynamicControls(Sender As Object, e As System.EventArgs)
error without signiture:
Method 'Public Sub ResetDynamicControls()' does not have the same signature
as delegate 'Delegate Sub EventHandler(sender As Object, e As
System.EventArgs)'
How can I use/call the same subroutine both from a button's event AND other
places such as within other subroutines?