Hi,

Please suggest me to do FolderBrowserDialog box for "C# Web Application".

Thanks a lot,
Anjali

why you need to develop it yourself as it exists? just add reference to System.Windows.Forms and use it in your web-based application.

Ya that's the great idea.
But iam getting this execption , can you please suggest me for this.

Exception : "Current thread must be set to single thread apartment(STA) before OLE calls can be made. Ensure that your main function has STAThreadAttribute marked on it . This exception is only raised if adebugger is attached to the process."

Thanks a lot,
Anjali

Just because you debug, run your web-based application (Ctrl + F5) there is no exception.

Its not working properly with (ctr + f5) also. Its very slow and FolderDialog is opening but does not contains anything..

Please check out the bellow code n please suggest me for the same.

private void btnBrowse_Click(object sender, EventArgs e)
{
    FolderBrowserDialog RootFile = new FolderBrowserDialog();
    if(RootFile.ShowDialog() == DialogResult.OK)
    {
        txtRootFolder.Text = RootFile.SelectedPath.ToString();
     }
} 

Thanks a lot,
Anjali ...

Authentication problem, I'll reply you ASAP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.