Exporting data from SQL Server to CSV file in ASP.Net using C#
Namespaces
You will need to import the following namespaces.
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
Code For Export DataTable to CSV
protected void ExportCSV(object sender, EventArgs e)
{
string constr...
Showing posts with label c#. Show all posts
Showing posts with label c#. Show all posts
Friday, March 30, 2018
Friday, October 6, 2017
Data Table to XML Genrate
///
/// Write out XML to a DataTable to a file in a controlled manner.
/// Use a XmlWriterSettings to control the output formatting.
///
public static string DataTableToXML(DataTable table)
{
...