开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜