473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Restrict the user to a particular folder in OpenFileDialog Control

Hi Friends,

Can anyone please help me with the OpenFileDialog Control in VB.Net? I want
the user to be restricted to a particular folder only for selecting a file,
i.e. they should not be able to change the directory in the OpenFileDialog!

Is there a way to implement this? Please let me know.

Thanks,
Paras Wadehra

You One Stop Entertainment Guide - http://www.paras.2ya.com/
Jul 21 '05 #1
1 5737
Hi,

There is no way in the Manged Open File Dialog to restrcit the user from
selecting from a particular directory only. I would suggest you use a listbox
and populate it with Directory.GetFiles listings to list all the files in
your current directory and then allow the user to choose only amongst them.

Regards,
Saurabh Nandu
[ www.AksTech.com ]
[ www.MasterCSharp.com ]

"Paras Wadehra" wrote:
Hi Friends,

Can anyone please help me with the OpenFileDialog Control in VB.Net? I want
the user to be restricted to a particular folder only for selecting a file,
i.e. they should not be able to change the directory in the OpenFileDialog!

Is there a way to implement this? Please let me know.

Thanks,
Paras Wadehra

You One Stop Entertainment Guide - http://www.paras.2ya.com/

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Peter | last post by:
Hello! Please, could anybody tell me, is it possible to run an asp page as particular user? I have this situation where I have one shared folder on particular server and this folder is shared...
11
by: Mr. B | last post by:
If you can set the 'initial' path of an OpenFileDialog box by something like the following: Dim FilesPath As String ' Files Path FilesPath = "P:\Projects\" FilesPath =...
3
by: juststarter | last post by:
Hello all, I am using an openFileDialog box to select a file (in order to insert it in a database). When the file is selected i am filling a few textboxes with the actual path, filename and...
1
by: Paras Wadehra | last post by:
Hi Friends, Can anyone please help me with the OpenFileDialog Control in VB.Net? I want the user to be restricted to a particular folder only for selecting a file, i.e. they should not be able...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
4
by: Eric | last post by:
I got a particular problem in visual studio 2005 There's a user control on page and I want to meka a cast like this MyPage mp=(MyPage)this.Page; Error is : cannot cast from...
1
by: sam | last post by:
OpenFileDialog appears to be "holding onto" the parent folder of a selected file until the application using the dialog quits. After creating a folder containing a file, I attempted to select...
6
by: kimiraikkonen | last post by:
Hello, I have a listbox and folder browser control. I need to display all .mp3 files' pathes into listbox. It was Ok with openfiledialog but how can list all .mp3 extension- having files into...
5
by: gracepaul | last post by:
hi, I had created a web application in c#. It is uploaded and going smoothly. Now the request of the client is to restrict the access of their site. They want access only in some machines(Not in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.