views:

67

answers:

2

i have a gridview as follows:

Sub    marks  result

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

im using the mail function to send the marks to the student. how to convert these gridview rows to the table rows or how to pass the gridview datas into mail function as 'message'

A: 

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.

JohnIdol
i need to pass the datas from the gridview to a mail msg as the Table format with both side gridlines.
Ranjana
A: 

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.

citronas
I'm curious. Which solution did you use?
citronas