Below method is working fine on my local system, but when i uploaded on site then it does not export datatable into CSV.
What can be the reason? any permission issue?
protected void btnExport_Click(object sender, EventArgs e)
{
DataTable dt = BLL.ReportQuery.clsMaterialOnOrder.getAlupolyExportItem_Details(ddlProdct.SelectedValue, ddlDesign.SelectedValue, ddlSize.SelectedValue, ddlColor.SelectedValue);
try
{
CreateCSVFile(dt, "c:\\" + "AlupolyExportItem" + ".csv");
lblStatus.Text = "Export successfully" + " c:\\" + "AlupolyExportItem" + ".csv";
}
catch (Exception)
{
lblError.Text = "Export failed";
}
}
public void CreateCSVFile(DataTable dtDataTablesList, string strFilePath)
{
...
Go to the complete details ...