Hi
I am trying to add FolderBrowserDialog to my ASP.NET page. So i added a reference to using System.Windows.Forms. Now i have placed a button and in button click event i have written code like this .
protected void Button1_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.ShowDialog();
}
When i run the application and click on the button i am geeting the following error.
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.
pls some help me to solve this problem