Creating a link from Repeater data

Sherri Guthrie asked on March 28, 2014 07:24

I have a repeater displaying information on our Intranet. I want to be able to click on a mailto link and use the description field from the repeater in the subject line of the email. How do I do extract it?

Correct Answer

Brenden Kehren answered on March 28, 2014 07:42

First you'd need a field to capture the data from the user in your document type, lets call it EmailAddress. Second you'd modify your transformation to include that link like so <a href='mailto:<%# Eval("EmailAddress")'#>>Email Link</a>

0 votesVote for this answer Unmark Correct answer

Recent Answers


Jan Hermann answered on March 28, 2014 08:10

There is a little typo, but the solution is correct:

<a href='mailto:<%# Eval("EmailAddress") #>'>Email Link</a>

with clickable e-mail address you can simply duplicate the Eval method:

<a href='mailto:<%# Eval("EmailAddress") #>'><%# Eval("EmailAddress") #></a>

1 votesVote for this answer Mark as a Correct answer

Sherri Guthrie answered on March 28, 2014 08:56

Thank you both. I was trying to use the Statichtml part outside of the Repeater but this works great!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.