As the title of the post describes, I am attempting save a DataTable straight into a SharePoint Document Library.
Here is what I had originally:
DataTable dt = new DataTable();
//add rows to datatable
foreach(GridViewRow row in Gv.Rows)
{
//omitted for the sake of brevity
}
dt.WriteXml("TEMP PATH", true);
However, instead of saving it to a temporary location as an xml file, can I do a sort of all in one where I convert the DataTable into an xml format and upload it to the Document Library? Thanks.