how to show open and save dialog box in c#?
Any Suggestions?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Deepak Kumar ChoudharyRank #4,523 · 339 reputationPosted Feb 27, 2014, 6:56 AM EST
-right clik on refrence folder
-select add refrence option
-add system.windows.forms namespace
2.Add namespace " using System.Windows.Forms" in header
use this following code to show saveFileDialog box
[STAThread]//it is mandatory to use STAThread
static void Main(string[] args)
{
SaveFileDialog op = new SaveFileDialog();
op.ShowDialog();
Console.ReadLine();
}
use this following code to show OpenFileDialog box
[STAThread]
static void Main(string[] args)
{
OpenFileDialog op = new OpenFileDialog();
op.ShowDialog();
Console.ReadLine();
}
Than execute the program
Sarath KumarRank #3,637 · 402 reputationPosted Feb 27, 2014, 11:57 PM EST
Any suggestions......
Anurag SarkarRank #1,049 · 1.8K reputationPosted Feb 28, 2014, 12:35 AM EST
W3 School Java Script Pop Up in ASP.NET you can use this in ASP.NET
http://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt
THANKS..