HyperlinkColumn = Email!

Discussion in 'ASP .Net' started by Adam J Knight, Apr 17, 2006.

  1. Hi all,

    I am trying to create an email link using the HyperLinkColumn in a DataGrid.
    Is their anyway i can do this using a DataBinding expression in the .aspx?

    Or will i have to do it in the CodeBehind?

    So far i have:
    <asp:HyperLinkColumn HeaderText="Email:" DataTextField="Email"
    DataNavigateUrlField="Email"/>
    This generates . I need to prepend the "mailto:" attribute.

    Any thoughts?

    Cheers,
    Adam
    Adam J Knight, Apr 17, 2006
    #1
    1. Advertising

  2. Adam J Knight

    Teemu Keiski Guest

    Hi,

    you'd want to use DataNavigateUrlFormatString also

    Something like:
    DataNavigateUrlFormatString="mailto:{0}"

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke


    "Adam J Knight" <> wrote in message
    news:...
    > Hi all,
    >
    > I am trying to create an email link using the HyperLinkColumn in a
    > DataGrid.
    > Is their anyway i can do this using a DataBinding expression in the .aspx?
    >
    > Or will i have to do it in the CodeBehind?
    >
    > So far i have:
    > <asp:HyperLinkColumn HeaderText="Email:" DataTextField="Email"
    > DataNavigateUrlField="Email"/>
    > This generates . I need to prepend the "mailto:" attribute.
    >
    > Any thoughts?
    >
    > Cheers,
    > Adam
    >
    Teemu Keiski, Apr 17, 2006
    #2
    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. Dmitri Manushin

    send more than 1 parametr from hyperLinkColumn?

    Dmitri Manushin, Aug 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    590
    Dmitri Manushin
    Aug 13, 2003
  2. SStory
    Replies:
    3
    Views:
    2,407
    SStory
    Oct 30, 2003
  3. Morten
    Replies:
    3
    Views:
    1,522
    Morten
    Nov 3, 2003
  4. vtreddy
    Replies:
    0
    Views:
    2,046
    vtreddy
    Nov 6, 2003
  5. Maziar Aflatoun

    asp:HyperLinkColumn question

    Maziar Aflatoun, Nov 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    376
    Chris Jackson
    Nov 24, 2003
Loading...

Share This Page