title: Use FolderBrowserDialog in asp.net WebApplication
body: <p>I am working on asp.net Web Application. I want to select Folder and upload all files in that selected folder. For that i have used FolderBrowserDialog control. This is my code</p>
  
  <pre><code>FolderBrowserDialog fi = new FolderBrowserDialog();
  
  DialogResult result = fi.ShowDialog();
  
  if (result == DialogResult.OK)
  {
      string foldername = fi.SelectedPath;
      foreach (string filename in Directory.GetFiles(foldername))
      {
          string asfas = filename;
      }
  }
  </code></pre>
  
  <p>but it gives error <code>Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.</code></p>