开发者

How to convert the gridview datas to the table in asp.net

开发者 https://www.devze.com 2022-12-26 15:01 出处:网络
I have agridview as follows: Submarksresult eng56p maths45f science 67p S.S78p I\'m using the mail function to send the marks to the student. How to convert these gridview rows to th开发者_Python百

I have a gridview as follows:

Sub    marks  result

eng     56     p
maths   45     f
science 67     p
S.S     78     p

I'm using the mail function to send the marks to the student. How to convert these gridview rows to th开发者_Python百科e table rows or how to pass the gridview datas into mail function as 'message'?


If some money is an available option, buy this component: http://www.aspnetemail.com/ It supports adding asp.net control into the mail content.

Another option might be to use an HtmlTextWriter and retrieve rendered html code for the gridview.


I am afraid there is no automatic way to do that in asp.net, you'll have to roll your own.

An alternative to that could be using a runat="server" table in the first place, that way you already have a table.

For sending an email in html format this link might help.

0

精彩评论

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