hameed

hameed

  • NA
  • 28
  • 18.8k

open file dialog box problem in web application aspx page

Sep 15 2010 12:35 AM

I am able to open the open file dialog box with this code.Its working fine with this code...
 OpenFileDialog fDialog = new OpenFileDialog();
    [STAThread]
    protected void Button1_Click(object sender, EventArgs e)
    {
        Thread MyThread = new Thread(ThreadMethod);
        MyThread.SetApartmentState(ApartmentState.STA);
        MyThread.Start();
    }
  public void ThreadMethod()
    {
       
        fDialog.Title = "Image";
        fDialog.Filter = "Image|*.jpg;*.jpeg;*.gif;*.png";
        string dir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
        fDialog.InitialDirectory = dir;
        fDialog.Multiselect = true;
        fDialog.AddExtension = true;
        fDialog.CheckFileExists = true;
        fDialog.CheckPathExists = true;
        fDialog.DereferenceLinks = true;
        fDialog.ValidateNames = true;
        fDialog.ShowHelp = true;
        fDialog.AutoUpgradeEnabled = true;
        fDialog.RestoreDirectory = true;
        DialogResult dr = this.fDialog.ShowDialog();
 
    }

My problem is..when i click the button.the fileopen dialog box opens back to web page...how to bring that control infront of web page...any idea please help me out.only in web application
 

Answers (1)