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...