mailto on hyperlink control

Discussion in 'ASP .Net' started by Rod Snyder, Aug 19, 2004.

  1. Rod  Snyder

    Rod Snyder Guest

    I have a hyperlink control for which the text property is the
    address in a db field. I want to display this and set the NavigateURL field
    of the control to the same field (with a "mailto:" prefix) in order to
    activate the mailto link; I'm getting errors where I try to put the mailto
    into the control coding. Am I going about this wrong or is there a way to do
    this inside the hyperlink control's NavigateURL property?
    Rod
     
    Rod Snyder, Aug 19, 2004
    #1
    1. Advertising

  2. Rod  Snyder

    Karl Guest

    Rod,
    I'm guessing that you are doing this in a repeater/grid/list with a
    DataBind()

    NavigateUrl='<%# "mailto:" + DataBinder.Eval(Container.DataItem, "Email"))
    %>' should work??

    Karl

    "Rod Snyder" <> wrote in message
    news:...
    > I have a hyperlink control for which the text property is the
    > address in a db field. I want to display this and set the NavigateURL

    field
    > of the control to the same field (with a "mailto:" prefix) in order to
    > activate the mailto link; I'm getting errors where I try to put the mailto
    > into the control coding. Am I going about this wrong or is there a way to

    do
    > this inside the hyperlink control's NavigateURL property?
    > Rod
    >
    >
     
    Karl, Aug 19, 2004
    #2
    1. Advertising

  3. Rod  Snyder

    Rod Snyder Guest

    Actually, I was trying to do this with a hyperlink control and the format
    doesn't seem to work.
    Rod

    "Karl" <none> wrote in message
    news:OXk%...
    > Rod,
    > I'm guessing that you are doing this in a repeater/grid/list with a
    > DataBind()
    >
    > NavigateUrl='<%# "mailto:" + DataBinder.Eval(Container.DataItem, "Email"))
    > %>' should work??
    >
    > Karl
    >
    > "Rod Snyder" <> wrote in message
    > news:...
    > > I have a hyperlink control for which the text property is the


    > > address in a db field. I want to display this and set the NavigateURL

    > field
    > > of the control to the same field (with a "mailto:" prefix) in order to
    > > activate the mailto link; I'm getting errors where I try to put the

    mailto
    > > into the control coding. Am I going about this wrong or is there a way

    to
    > do
    > > this inside the hyperlink control's NavigateURL property?
    > > Rod
    > >
    > >

    >
    >
     
    Rod Snyder, Aug 19, 2004
    #3
    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. =?Utf-8?B?TWFyY2lhbA==?=

    Gridview hyperlink column mailto event

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

    MailTo Hyperlink in Gridview

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

    mailto: in datagrid hyperlink

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

Share This Page