Groups | Blog | Home
all groups > asp.net > january 2008 >

asp.net : how to get clickable email from aspnetdb?


George Ter-Saakov
1/22/2008 5:28:20 PM
You must have following html in order to make it clickable

<a hef="mailto:myemail@site.com">email</a>


PS: Look up mailto tag, you can automatically prepopulate subj and message
body also.
George.


[quoted text, click to view]

Mich
1/22/2008 11:01:06 PM
Hi,

I can fetch the mailaddresses from table aspnet_membership in a gridview. I
just create a sqldatasource and a gridview and this sql statement, all in
the aspx file.

SelectCommand="select aspnet_Users.UserName as Lid, aspnet_Membership.Email
as Emailadres FROM aspnet_Membership INNER JOIN aspnet_Users ON
aspnet_Membership.UserId = aspnet_Users.UserId "


But i want to be able to click on those mailaddresses and so starting my
outlook.

Thanks for help.

Mich
1/23/2008 9:23:29 AM
Thanks, i know this tag. My problem is: how to integrate it in the sql
statement in the aspx file?
I tried this, but get an error "tag not wel formed":

SelectCommand="select aspnet_Users.UserName as Lid, " & "<a href='mailto:'"
& "aspnet_Membership.Email" & ">email</a> as Emailadres FROM
aspnet_Membership INNER JOIN aspnet_Users ON aspnet_Membership.UserId =
aspnet_Users.UserId ">



"George Ter-Saakov" <gt-nsp@cardone.com> schreef in bericht
news:uM0yYYUXIHA.3940@TK2MSFTNGP05.phx.gbl...
[quoted text, click to view]

Mich
1/23/2008 9:53:16 AM
I also tried this but same error:

SelectCommand="select aspnet_Users.UserName as Lid, + '<a href=' +
'"mailto:"' + aspnet_Membership.Email +'>' + aspnet_Membership.Email + '
</a>' as Emailadres FROM aspnet_Membership INNER JOIN aspnet_Users ON
aspnet_Membership.UserId = aspnet_Users.UserId ">


"George Ter-Saakov" <gt-nsp@cardone.com> schreef in bericht
news:uM0yYYUXIHA.3940@TK2MSFTNGP05.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button