WhiteHatBox
Official Twitter Account
Get Support
Create Support Ticket
Share Page
Following(0)
Partner List
goodvibes

Save file dialog box

ReplyThanks 2018/08/12 04:50:38 0 0

Hi,

Is it possible to create a save file dialog using c# on a HTML form? I have been attempting this but with no success. If not are there other ways to go about achieving a similar result?

Thanks for any help :)

Aprilcaicai
2018/08/13 11:54:26

Try to use this one to check if it works.

goodvibes
2018/08/14 18:54:12
Unfortunately this didn’t work I want the user to be able select a local file to save the results too. I have tried many different things but I can’t get it to work. I’m just after a save as dialog box just like the ones in BotChief editor. Any suggestions? Thank you
goodvibes
2018/08/14 18:58:16
I think the above suggestion was an open dialog box, but I was after a save dialog box
Aprilcaicai
2018/08/15 16:53:42
The one we shared to you is to open a dialog box, but its actual function is to get the path which is selected by the user, so we think this one should be able to solve your question.


Here is another solution: use Run CSharp Code command, click Test Code to get the sample code, then copy and paste following code to textbox, then save the results.


using System;
using System.Windows.Forms;
namespace TestNameSpace
{
public class TestClassName
{
public static string GetCurrentDate()
{
SaveFileDialog savefile = new SaveFileDialog();
if(savefile.ShowDialog()== DialogResult.OK)
{
return savefile.FileName;
}
else
{
return "";
}
}
}
}




goodvibes
2018/08/15 17:20:56
That worked perfectly thank you
<< < 1> >>
VerifyCode
Advanced Option