GridView中的超链接控件以打开邮件页面onclick [英] Hyperlink control in gridview to open mail page onclick
本文介绍了GridView中的超链接控件以打开邮件页面onclick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的数据库包含EmployeeNo,EmployeeName,SupervisorName,Delegate,Dept No ...字段.我想在Gridview中将字段EmployeeName,SupervisorName,Delegate的数据显示为带下划线的链接.当我单击这些链接时,应打开一个邮件页面,其中包含所选链接的电子邮件ID包含在邮件页面的收件人"字段中…….我该怎么做?任何人请帮助我......
谢谢
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
推荐答案
<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>
这篇关于GridView中的超链接控件以打开邮件页面onclick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文