Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > mailto in hyperlink field of datagrid

Reply
Thread Tools

mailto in hyperlink field of datagrid

 
 
jdw
Guest
Posts: n/a
 
      03-29-2006
I have seen sample code to add mailto feature in datagrid hyperlink
field using the RowDataBound event.

I did it a bit different. e-amil address are stored in a database.
http://www.velocityreviews.com/forums/(E-Mail Removed).

I created a derived field in my select statement select 'mailto:' +
[EMAIL]. from table. I converted the hyplerlink to a template field. I
then edited the source as follows.


<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl='<%#Bind("mailto") %>' Text="E-Mail"></asp:HyperLink>
</ItemTemplate>

This is working for me.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What to do with #<URI::MailTo:0xb762601c URL:mailto:username@company.com> Thomas Gagne Ruby 2 03-15-2013 10:49 AM
MailTo Hyperlink in Gridview Stuart Ferguson ASP .Net 7 08-27-2009 07:36 AM
mailto: in datagrid hyperlink =?Utf-8?B?c2Ft?= ASP .Net 3 12-30-2005 04:02 PM
Gridview hyperlink column mailto event =?Utf-8?B?TWFyY2lhbA==?= ASP .Net 2 12-29-2004 11:45 PM
mailto on hyperlink control Rod Snyder ASP .Net 2 08-19-2004 10:57 AM



Advertisments