mailto on hyperlink control

R

Rod Snyder

I have a hyperlink control for which the text property is the (e-mail address removed)
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
 
K

Karl

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
 
R

Rod Snyder

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top