mailto on hyperlink control

  • Thread starter Thread starter Rod Snyder
  • Start date Start date
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
 
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
 
Actually, I was trying to do this with a hyperlink control and the format
doesn't seem to work.
Rod
 
Back
Top