Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello friends i m having mailaddress in table like abc@abc.com

inside repeater i coded as
<asp:HyperLink ID="Hp1" NavigateUrl='mailto:<%#Eval("mail") %>' runat="server"><%#Eval("mail") %></asp:HyperLink>

but this is not working.


please give me the solution
Posted
Updated 29-Apr-11 1:16am
v2
Comments
Rajesh Anuhya 29-Apr-11 7:26am    
what is the error you getting.
beginner in C#.net 29-Apr-11 7:55am    
i am not getting any error but its not open mail message window.

use the following code.

<asp:HyperLink ID="Hp1" runat="server" NavigateUrl='<%# string.Concat("mailto:",Eval("Email")) %>'  Text='<%#Eval("Email") %>'></asp:HyperLink>
 
Share this answer
 
Comments
beginner in C#.net 29-Apr-11 8:41am    
ya its working fine... tnx friend
Wonde Tadesse 29-Apr-11 8:49am    
You're most welcome.
Just a thought. What about you changing the SQL to get this email address in the format you want? Then you can create this like,
<asp:HyperLink ID="Hp1" NavigateUrl='mailto:<%#Eval("mailto") %>' runat="server"><%#Eval("mail") %>

C#
SELECT email as 'mail, 'mailto:' + email as 'mailto' from MyTable

Hope this helps :)
 
Share this answer
 
v3
Comments
beginner in C#.net 29-Apr-11 8:01am    
no sir i get the mail address from mail column like <%#Eval("mail")%>.
in mail i am having data like abc@gmail.com
w

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900