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
Sign In
Register
AdSense Revenue
Gifts
Active Members
Today
krishnasamy
(83)
Karthikeyan S
(80)
Rajesh(March-20...
(68)
Last 7 Days
D.Jeya kumar(J...
(1198)
Athira Appukut...
(1137)
UltimateRengan
(1134)
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 2008
Member Level:
Gold
Rating:
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
Help plz
how to convert the page into binary format
Download option in Web Application
updation problem-pls reply soon
interview question
dotNet Slackers
BizTalk Adaptors
Web Design
teleconferencing
Contact Us
Privacy Policy
Terms Of Use