Hi there,
I have a button on my webpage to export to CSV a SQL statement. While I have the code working perfectly, I cannot specify the filepath to save to and I am getting the file saved automatically to my roaming profile. How can allow the user to specify the path to save the file to?
Here is the code I am using:
protected void btnExport_Excel_Click(object sender, ImageClickEventArgs e) { DateTime theDate = DateTime.Now; decimal yada = Convert.ToDecimal(theDate.Date.ToString("yyyyMMdd")); string finaldate = yada.ToString(); string fileName = finaldate + "_business_unit.csv"; SQLToCSV("select * from dbo.business_unit", fileName); }
the SQLToCSV works perfectly fine, its just the to get the user specified path into the FileName.
Any assistance would be appreciated.
Regards
mbardon
Regards mBardon