C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







OpenDialogBox in ASP.NET


Posted Date: 04 Jul 2008      Total Responses: 1

Posted By: Athira Appukuttan       Member Level: Diamond     Points: 1


Am working with ASP.NET.I have code for seeing files from folders.Here am using namespace System.Windows.Forms.then am using dialogbox in ASP.NEt site
But am getting error like '"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."


Please Help me...

My code is

OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Title = "C# Corner Open File Dialog";
fdlg.InitialDirectory = @"c:\";
fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*";
fdlg.FilterIndex = 2;
fdlg.RestoreDirectory = true;
if(fdlg.ShowDialog()==DialogResult.OK)
{
string a = fdlg.FileName;
}




Responses

Author: Sujit Kumar    04 Jul 2008Member Level: GoldRating:     Points: 2
you can visit this site and take some idea about openfiledialog in asp.net

http://www.codeproject.com/KB/dialog/OpenFileDialogEx.aspx


Post Reply
You must Sign In to post a response.
Next : how to assign the sotred procedure to command object or adapter object in asp.net page
Previous : need script for site meter
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

teleconferencing

Contact Us    Privacy Policy    Terms Of Use