title: Cannot get SaveFileDialog to work with my web page
body: <p>I'm trying to add a method which uses a link from my grid view then gets the file from the server in the form of a Stream and then prompts the user where to save it. I've added the System.Windows.Forms reference to my controller and then added the following method.</p>
  
  <pre><code>[HttpGet]
  [Authorize]
  public void DownloadAssetStream(int assetID)
  {
      //gStream created from server file.
      Stream myStream = gStream;
      SaveFileDialog saveFileDialog1 = new SaveFileDialog();
  
      saveFileDialog1.Filter = "pdf files (*.pdf)|*.pdf|All files (*.*)|*.*";
      saveFileDialog1.FilterIndex = 2;
      saveFileDialog1.RestoreDirectory = true;
  
      if (saveFileDialog1.ShowDialog() == DialogResult.OK)
      {
              if ((myStream = saveFileDialog1.OpenFile()) != null)
              {
                  // Write file from stream.
                  myStream.Close();
              }
          }
      }
  }
  </code></pre>
  
  <p>There is no error but when code hits line <code>if (saveFileDialog1</code> it goes nowhere and dialog doesn't appear. What am I missing?</p>