Sub Run (sender as Object, argument as ImageClickEventArgs) Handles
Button1.Click, Button2.Click
dim button as ImageButton = ctype(sender, ImageButton)
if button.Id = "Button1" then
End Sub
or you could use the commandArgument at that point..
if ctype(sender, ImageButton).CommandArgument = "SomeArg" then
something like that should work.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
news:eo**************@TK2MSFTNGP14.phx.gbl...
Hello,
I have 2 Asp:ImageButton in my .aspx file and I have the function "Run" in
m .aspx.vb file. I need to run this function when one of the ImageButtons
is pressed but I need to know which one was pressed.
How can I do this?
I was trying with commandname and oncommand properties of ASP:ImageButton
but I was not able to make this work.
Can someone tell me how the code line would look in an ImageButton and in
my function:
Sub Run(???) ???
...
Thank You,
Miguel