Convert DataTable to HTML in C#

public static string ConvertDataTableToHTML(DataTable dt)
    {
        string html = "<table border='1' cellpadding='0' cellspacing='0'>";
        //add header row
        html += "<tr>";
        for (int i = 0; i < dt.Columns.Count; i++)
            html += "<th bgcolor='#507CD1' style='padding: 2px; color: #FFFFFF'>" + 
            dt.Columns[i].ColumnName + "</th>";
        html += "</tr>";

        //add rows
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            html += "<tr>";
            for (int j = 0; j < dt.Columns.Count; j++)           
            html += "<td style='padding: 2px;'>" + dt.Rows[i][j].ToString() + "</td>";                
        html += "</tr>";
        }
        html += "</table>";
        return html;
    }