Showing Save As dialog in C# 2.0 - Windows

O

Omer

HI,
I have showed a Save As dialog in ASP.Net many times. Now trying to
show one in windows based application but to no avail, can anybody tell
me how to do it ? My application is writing a file, and I just want a
Save As/ Open File dialog, like the one we have in web based
applications.
I'll be very thankful for your response.
Regards,
Omer
 
G

Guest

in visual studio you can drag and drop a savefiledialog or openfiledialog
onto your form, then type

//if you clicked OL
if(openFileDialog1.ShowDialog == DialogResult.OK)
{
txtFileName = openFileDialog1.FileName.ToString();
}
else
{
//nothing. you clicked cancel
}


same would go for the saveFileDialog...

if you google OpenFileDialog or SaveFileDialog you will see many results
that have ot do with what you are trying to accomplish.

if you do not have visual studio, you can create one programmatically with

OpenFileDialog open = new OpenFileDialog();
 
O

Omer

Thanks roger_27.

roger_27 said:
in visual studio you can drag and drop a savefiledialog or openfiledialog
onto your form, then type

//if you clicked OL
if(openFileDialog1.ShowDialog == DialogResult.OK)
{
txtFileName = openFileDialog1.FileName.ToString();
}
else
{
//nothing. you clicked cancel
}


same would go for the saveFileDialog...

if you google OpenFileDialog or SaveFileDialog you will see many results
that have ot do with what you are trying to accomplish.

if you do not have visual studio, you can create one programmatically with

OpenFileDialog open = new OpenFileDialog();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top