Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / May 2006

Tip: Looking for answers? Try searching our database.

OpenFileDialog throws "Illegal characters in path"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shilpa - 29 May 2006 11:29 GMT
Hi,

I have a OpenFileDialog on my windows form whose filter is *.*.
I want the users to be able to further filter the files by giving *.doc
or *.zip etc in the "file name" field of the dialog (Just like it
happens in the open file dialog of MS Word)
Currently, if the user enters a wild card character in the file name
field, it is throwing an exception with the message "Illegal characters
in path".
Please let me know how to achieve the above mentioned functionality.

Regards,
Shilpa
jaybinod@gmail.com - 29 May 2006 14:00 GMT
Hi,

Try this,

this.openFileDialog1.Filter = "Word Document|*.doc";

Regards,
Jay
jaybinod@gmail.com - 29 May 2006 14:02 GMT
Hi,

Try this,

this.openFileDialog1.Filter = "Word Document|*.doc";

Regards,
Jay
Shilpa - 30 May 2006 07:12 GMT
Hi,

Thanks for the reply.
But my application requires the user to enter a wildcard character in
the file name of the OpenFileDialog (say *.zip) when the actual filter
of the dialog is *.*.
How do I go about doing this?

Regards,
Shilpa
Claes Bergefall - 30 May 2006 17:11 GMT
I can't reproduce this in .NET 2.0. Works just fine typing wildcards in the
filename box. What version are you using?

  /claes

> Hi,
>
[quoted text clipped - 9 lines]
> Regards,
> Shilpa

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.