-
save file
Hi,
In my win application I use the following code to save the downloaded data into the necessary format
sw = File.CreateText(strPath & ".csv")
please not ethat .csv can be .xml instead
This works fine but what should I do in web (asp.net)?
I can not use the above line as it complains about the network path where the file should be installed.
If the best way is to get a dialog box to save as then how is it done please?
thanks
-
Something along the lines of...
(please not that this is in C# but you should be able to translate it easily)
Code:
private void cmdSelectOutputFile_Click(object sender, System.EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.OverwritePrompt = true;
sfd.DefaultExt = "txt";
sfd.Filter = "Text File (*.txt)|*.txt";
sfd.ShowDialog();
//public string...
SavePath = sfd.FileName;
}