For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > May 2005 > htmlinputimagecontrol









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author htmlinputimagecontrol
simon

2005-05-30, 3:59 pm

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)


Brock Allen

2005-05-30, 8:58 pm

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




simon

2005-05-31, 9:10 am

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



Damien

2005-05-31, 9:10 am



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",
"java script:alert('hi');")

(With appropriate name of your imagebutton control)?

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com