how to choose file path to save file asp.net webform dynamic

Nepethya Rana

Nepethya Rana

Jul 25 2017 11:23 AM
I have already created a dll which has function that loads dataset to xls file.
I am trying to use the same dll for the task. Function takes two parameters, filePath with file name and dataset, and it does is create xlsx file
in the destination with the data.
Now i have to let user to decide to whereever they want to create (save) that xls file in their machine.
How could i achieve this task in asp.net web form.
My code is something like this:

protected void btnExport_Click(object sender, EventArgs e)
DataSet dataSet = new DataSet();
//code to get data from database
string fullFileName = filePath + fileName;
ExcelUtility.ExportDataSetToExcel(fullFileName, dataSet);
I want user to set fullFileName. How do i do this?
Please help.

Answers (1)