Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Browse

Status
Not open for further replies.

dcushnie

Programmer
Feb 2, 2005
28
CA
So what I want is simply a button on a webpage that opens a local file browse dialog.
I don't want to upload the file anywhere, I just want it's path.
I know there is a file upload control but I don't want to use it because I don't want the textbox that goes with it and I also don't want the button to say "Browse".
I tried to use System.Windows.Forms.OpenFileDialog but it throws this 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.

Is there anyway to do what I want?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top