Home DotNet HyperLinkField mailto
09.09.2010
Main Menu
Programming
.NET Controls
Operating System
Databases
Articles
Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: StumbleUpon Add to: Slashdot Add to: Yahoo Add to: Technorati Add to: Google
HyperLinkField mailto

If you are trying to use the HyperLinkField mailto function then you will most like encounter a problem unless you have set it up correctly to fixed.

 Here I try to use the HyperLinkField but it does work as expected:

<asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" CssClass="DataTableProjects"

                                DataSourceID="SqlDataSourceBIcontacts" GridLines="None" ShowHeader="False">

   <Columns>

        <asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location" />

        <asp:HyperLinkField DataNavigateUrlFields="RTCFlink" DataTextField="Name" HeaderText="Name" />

   </Columns>

   <AlternatingRowStyle CssClass="SearchResultsAlternateCell" />

</asp:GridView>

 

To get around this issue you can try the following thing, instead of using the HyperLinkField try to use the BoundField.

 

<asp:BoundField DataField="SendTo" DataFormatString="<a href=mailto:{0}>{0}</a>"

    HtmlEncodeFormatString="false" HeaderText="Email" SortExpression="SendTo" />

 

 



Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."