Change onClick event

T

tshad

Is there a way to change the onClick event of a LinkButton?

At the moment, I am using 2 buttons that I toggle the visibility on and off.
I would like to use just one button, if possible and just change the onClick
event as well as the ImageUrl during postback.

I tried it but got the message:'

Compiler Error Message: BC30390:
'System.Web.UI.WebControls.ImageButton.Protected Overridable Sub OnClick(e
As System.Web.UI.ImageClickEventArgs)' is not accessible in this context
because it is 'Protected'.

when I tried to do:

SaveRecord.OnClick="InsertRecord_Click"

Is there a way to do this or do I need to use 2 different buttons?

Thanks,

Tom
 
G

Guest

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click, Button2.Click

End Sub

button1, button2
both buttons can handle the same click event.
--
http://pathidotnet.blogspot.com
=====
vInAypAtHi
o__
---_,>/'_------
(_) \(_)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top