20 August 2013

Email Binding in Asp.Net GridView

<asp:GridView ID="gv1" runat="server">
                        <Columns>
                            <asp:TemplateField HeaderText="Email">
                                <ItemTemplate>
                                    <asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# string.Format("mailto:{0}", Eval("Email")) %>'
                                        Text='<%# Eval("Email") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>

No comments:

Post a Comment