locked
output dataset table information into email body RRS feed

  • Question

  • User-960441985 posted

    Hi,

    HOw I can move/transfer dataset table information to email body directly. It has multiple columns. The data is working fine once I bind with gridview.

      DataSet ds = new DataSet();
    
            da.Fill(ds, "gvdata");
    
            gv1.DataSource = ds.Tables["gvdata"];
            gv1.DataBind();
        

    in email it prints only a string

    msg.Body = "abc Program<br><br>"
                    + ds.Tables["gvdata"] +"<br><br>";

    please help ASAP

    Friday, June 20, 2014 4:32 PM

Answers

  • User-663458986 posted

    Hi,

    you need to build HTML for your DataTable

    please refer to below examples.

    http://developersmania.blogspot.ae/2010/06/convert-datatable-to-html.html
    http://forums.asp.net/post/4576909.aspx [Dynamic GridView Approach]
    

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 26, 2014 3:04 AM