Advertisement

12.21.2007 at 04:03PM PST, ID: 23039300
[x]
Attachment Details

How do you create mailto link in datagrid with email address field but show the user's name?

Asked by audExpert in Miscellaneous Web Development, Programming for ASP.NET

Tags: datagrid, email, link

How do you create a datagrid with a hyperlink field which: uses a users email address field to create the mailto link but shows the user's name as the link's clickable text?  I've scoured the web and find examples of how to create a link with the same field you display but nothing like I've described.  What I get is the hyperlink field with just the name but the link doesn't work.  Please advise or provide a WORKING example.  Thanks.



Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
Here is my grid code:
 
 <asp:GridView ID="GridViewAudOffContacts" runat="server" DataSourceID="SqlDataSource2" AutoGenerateColumns="False" AllowSorting="True" EnableSortingAndPagingCallbacks="True" SkinID="skinGridView" EnableTheming="False" Width="100%" HeaderStyle-Font-Bold="true" >           
         <Columns>                     
             <asp:HyperLinkField DataNavigateUrlFields="Email" DataNavigateUrlFormatString="mailto:{0}"
                 DataTextField="Name" HeaderText="Name" Text="Name" />
             <asp:BoundField DataField="Division" HeaderText="Division" SortExpression="Division" />       
             <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
             <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" >
                 <ItemStyle Width="110px" />
             </asp:BoundField>
        </Columns>     
             Font-Size="8pt" />
    </asp:GridView>
[+][-]12.21.2007 at 04:08PM PST, ID: 20517185

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.22.2007 at 12:06PM PST, ID: 20519739

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.10.2008 at 04:41PM PST, ID: 20633097

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.15.2008 at 11:05PM PST, ID: 20908636

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]02.20.2008 at 03:43PM PST, ID: 20943335

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Miscellaneous Web Development, Programming for ASP.NET
Tags: datagrid, email, link
Sign Up Now!
Solution Provided By: Computer101
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628