Pass a parameter with a method thought OnClick

Discussion in '.NET' started by junk.rail, Jun 29, 2010.

  1. junk.rail

    junk.rail

    Joined:
    Jun 29, 2010
    Messages:
    4
    Hi guys,

    I want to do the next.

    I got a populated DataGrid with 5 colums: id, name, address, email and download, the download column it's a ASP IMAGENBUTTON.

    I would like to add a onClick event to the ASP BUTTON and pass thought it a parameter, but I need to send the current id's column regarding to the previously clicked row.

    I wass thinkin in something likes this:

    <ASP:TEMPLATECOLUMN>
    <headertemplate>Exportar</headertemplate>
    <ITEMTEMPLATE>
    <ASP:IMAGEBUTTON id="ImageDelete" Runat="server" AlternateText="" ImageUrl="~/img/excel.png" onClick="sendPara(' <%# ( ( DataRowView ) Container.DataItem ) [ "id" ] %> ');"/>
    </ASP:IMAGEBUTTON>
    </ITEMTEMPLATE>
    </ASP:TEMPLATECOLUMN>

    but it doesn't work...

    Do you have any advice guys?

    Thank you in advance...
     
    junk.rail, Jun 29, 2010
    #1
    1. Advertisements

  2. junk.rail

    junk.rail

    Joined:
    Jun 29, 2010
    Messages:
    4
    Any Idea guys?

    any idea guys?

     
    junk.rail, Jun 30, 2010
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael
    Replies:
    4
    Views:
    317
    Carl Banks
    Jul 2, 2006
  2. PhilTheGap
    Replies:
    6
    Views:
    14,830
    Steven Cheng [MSFT]
    Jun 13, 2008
  3. gabriele renzi
    Replies:
    17
    Views:
    252
  4. SM
    Replies:
    2
    Views:
    203
  5. AzamSharp
    Replies:
    2
    Views:
    250
Loading...

Share This Page