开发者

Problems with grid view in ASP.NET

I am displaying a table with user email ID and name in a GRID view in a ASP.NET web Page. I want a send mail button or link next to each row. SO that when I click the send mail button the useremail in that row will be copied and the page wil开发者_如何学运维l be redirected to send mail page. How to do it?

BTW i am using MYSQL


You can use a HyperLink field:

<asp:HyperLinkField DataTextField="email" HeaderText="Mail To:" DataNavigateUrlFields="email" Target="_blank" DataNavigateUrlFormatString="SendMail.aspx?email={0}" SortExpression="email" />

hope Thisa helps


Probably it would be like this

<asp:GridView runat="Server" id="GrdVw_Email">
<asp:BoundField DataField="Email" HeaderText="Email"/>
<asp:BoundField DataField="Name" HeaderText="Name"/>
<asp:BoundField DataField="Email" DataFormatString="email.aspx?id={0}" DataText="SendEmail"/>
</asp:GridView>

i just put the code from my mind, but you should get the idea

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜