Home » Category » DotNet

DotNet: htmlinputimagecontrol

204| Fri, 06 Jun 2008 10:07:00 GMT| simon| Comments (3)
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)

Keywords & Tags: htmlinputimagecontrol, dotnet, .net

URL: http://dotnet.itags.org/dotnet-tech/313843/
 
«« Prev - Next »» 3 helpful answers below.
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


> 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)
>


brockallen | Fri, 06 Jun 2008 10:09:00 GMT |

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

"Brock Allen" <ballen...NOSPAMdevelop.com> wrote in message
news:833920632530636724138768...msnews.microsoft.com ...
> 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
>
>
>


simon | Fri, 06 Jun 2008 10:10:00 GMT |

simon wrote:
> 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)?

damien | Fri, 06 Jun 2008 10:11:00 GMT |

DotNet Hot Answers

DotNet New questions

DotNet Related Categories