goofyui
goofyui

Reputation: 3492

Invoking Dialog window from C#

Edit: I am working on Web Application.

How do I invoke a Dialog window which allows us to save a file in C#?

If I am able to show the window, then I would be able to save the file automatically to the desired window

Upvotes: 1

Views: 162

Answers (2)

jnosek
jnosek

Reputation: 4253

Use the SaveFileDialog class in System.Windows.Forms.

Upvotes: 2

LarsTech
LarsTech

Reputation: 81675

  string saveName;
  using (SaveFileDialog saveFile = new SaveFileDialog())
  {
    if (saveFile.ShowDialog() == DialogResult.OK)
      saveName = saveFile.FileName;
  }

Upvotes: 4

Related Questions