mailto in hyperlink field of datagrid

Discussion in 'ASP .Net' started by jdw, Mar 29, 2006.

  1. jdw

    jdw Guest

    I have seen sample code to add mailto feature in datagrid hyperlink
    field using the RowDataBound event.

    I did it a bit different. e-amil address are stored in a database.
    .

    I created a derived field in my select statement select 'mailto:' +
    . from table. I converted the hyplerlink to a template field. I
    then edited the source as follows.


    <ItemTemplate>
    <asp:HyperLink ID="HyperLink1" runat="server"
    NavigateUrl='<%#Bind("mailto") %>' Text="E-Mail"></asp:HyperLink>
    </ItemTemplate>

    This is working for me.
     
    jdw, Mar 29, 2006
    #1
    1. Advertising

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. Rod  Snyder

    mailto on hyperlink control

    Rod Snyder, Aug 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    715
    Rod Snyder
    Aug 19, 2004
  2. =?Utf-8?B?TWFyY2lhbA==?=

    Gridview hyperlink column mailto event

    =?Utf-8?B?TWFyY2lhbA==?=, Dec 28, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    7,561
    =?Utf-8?B?TWFyY2lhbA==?=
    Dec 29, 2004
  3. Stuart Ferguson

    MailTo Hyperlink in Gridview

    Stuart Ferguson, Sep 28, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    15,003
    Hystic
    Aug 27, 2009
  4. =?Utf-8?B?c2Ft?=

    mailto: in datagrid hyperlink

    =?Utf-8?B?c2Ft?=, Dec 29, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,142
    =?Utf-8?B?c2Ft?=
    Dec 30, 2005
  5. Thomas Gagne
    Replies:
    2
    Views:
    336
    Robert Klemme
    Mar 15, 2013
Loading...

Share This Page