public ActionResult Cambios(string funcion) { DataTable cambios = rep.CambioEnPrecios(); string columnas = ""; for (int j = 0; j < cambios.Rows.Count; j++) { string temp = string.Format("<tr><td>" + cambios.Rows[j][1].ToString() + "</td>" + "<td>" + cambios.Rows[j][2].ToString() + "</td><td>" + cambios.Rows[j][3].ToString() + "</td>" + "<td>" + cambios.Rows[j][4].ToString() + "</td>" + "<td>" + cambios.Rows[j][5].ToString() + "</td></tr>"); columnas += temp; } return(Json(columnas, JsonRequestBehavior.AllowGet)); }