DotNet: htmlinputimagecontrol

  • simon / 204 / Thurs, 18 Jun 2009 12:00:00 GMT / 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:

    htmlinputimagecontrol, dotnet, .net

  • http://dotnet.itags.org/dotnet-tech/313843/«« Last Thread - Next Thread »»
    1. 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 |

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

    3. 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 Questions

    • OnClick event

      If I put button into the header of my DataGrid:<asp:TemplateColumn><HeaderTemplate><a...

      By simon, 1 Comments

    • Label and Bitmap

      Hello,I hope that someone can help me. I am developing code with C# .NET todisplay units which are o...

      By labeloverbitmapdisplay, 1 Comments

    • Using a base class for a loaded UC (Part III)

      Continuing my ongoing journey through base classes...Thanks to help from some folks, I think I'v...

      By darrel, 2 Comments

    • Label and Bitmap

      Hello, I hope that someone can help me. I am developing code with C# .NET to display units which are...

      By anonymous, 1 Comments

    • Label and Bitmap

      Hello,I hope that someone can help me. I am developing code with C# .NET todisplay units which are o...

      By labeloverbitmapdisplay, 1 Comments