Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
My database contains fields EmployeeNo, EmployeeName, SupervisorName, Delegate, Dept No... I want to display the data of fields EmployeeName, SupervisorName, Delegate as links with underline in gridview. when i clicked on these links a mail page should be opened with the emailid of selected link Contained in To field of mail page....... How can i do this? anyone plz help me......

Thanks
Posted

1 solution

ASP.NET
<asp:gridview id="gridView" runat="server" cellpadding="4" enablemodelvalidation="True" width="100%" autogeneratecolumns="False" allowpaging="true" xmlns:asp="#unknown">
   <columns>
       <asp:templatefield sortexpression="TITLE" headerstyle-width="25%">
       <HeaderTemplate>
                 <asp:linkbutton id="lnk" runat="server" text="Title">
                 </asp:linkbutton>
       </HeaderTemplate>
       <itemtemplate>
                 <asp:hyperlink id="hyperLink" runat="server" text="<%# DataBinder.Eval(Container.DataItem, "TITLE").ToString()%>" navigateurl="<%# "NewPage.aspx?id=" + DataBinder.Eval(Container.DataItem, "PK_ID")%>">
                 </asp:hyperlink>
       </itemtemplate>
       </asp:templatefield>
    </columns>

</asp:gridview>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900