htmlinputimagecontrol

  • Thread starter Thread starter simon
  • Start date Start date
S

simon

I have <input type=image runat=server > control in dataRepeater.

Then I have

Private Sub inputImage_ServerClick(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs) Handles inputImage.ServerClick

end sub

method on code behind.

When user click on my image, I would like that selected line id is passed
somewhere else.
How can I pass the argument to the inputImage_ServerClick sub?

I tried with name attribute.

But I can't read e.name in server function.

Any example?

Thanks, Simon

(I don't use asp:imageButton control because of other reasons)
 
If you were using a <asp:ImageButton> then you could handle the Reperater's
ItemCommand event. The parameter to that event is the row in the repeater,
which makes it convenient to find out what row was clicked. Why are you having
problems with the <asp:ImageButton>?

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Hi, Allen,

I'm using onmouseover and onmouseout client events. <asp:ImageButton>
doesn't has those events.
Do you have any solution with <input type=image runat=server > control ?

Regards,
Simon
 
simon said:
Hi, Allen,

I'm using onmouseover and onmouseout client events. <asp:ImageButton>
doesn't has those events.
Do you have any solution with <input type=image runat=server > control ?

Regards,
Simon
It may not have those events, but have you tried

Me.ImageButton1.Attributes.Add("onmouseover",
"javascript:alert('hi');")

(With appropriate name of your imagebutton control)?
 

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

Back
Top