Avatar of Camillia
Flag for United States of America asked on

Binding to email in repeater

I have the code below but it's not binding correctly. It's in a repeater. It binds as such:

Email: < %# Bind("Email") % > 

That's actually the display. I bet i'm missing a single quote somewhere but i dont know...
                    <td width="137"><label for="email_address_staff">Email:</label></td>
                    <td width="310">
                    <asp:HyperLink NavigateUrl='< %# Bind("Email", "mailto:{0}") % >' Text='< %# Bind("Email") % >' runat="server" ID="hlEmail"/>
                    <td width="280">&nbsp;</td>

Open in new window


Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Sorry, just realized the link is exactly the same as yours. What do you mean it is not binding correctly?

Just fixed it. Yes, i got mine also from that link. But this time, it works! I changed the double quotes and now it's fine:

<asp:HyperLink NavigateUrl='<%# Bind("Email", "mailto:{0}") %>' Text='<%# Bind("Email") %>' runat="server" ID="hlEmail"></asp:HyperLink>

There should not be any space between "<" and "%".

<%# ...


< %#
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck