Restrict the user to a particular folder in OpenFileDialog Control

Discussion in 'ASP .Net' started by Paras Wadehra, Aug 3, 2004.

  1. 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/
     
    Paras Wadehra, Aug 3, 2004
    #1
    1. Advertising

  2. 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/
    >
    >
    >
     
    =?Utf-8?B?U2F1cmFiaCBOYW5kdQ==?=, Aug 15, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne  Wengert

    Problem With OpenFileDialog

    Wayne Wengert, Aug 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,803
    Wayne Wengert
    Aug 11, 2003
  2. Tabo

    ASP control like OpenFileDialog

    Tabo, Aug 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    422
    Kevin Spencer
    Aug 14, 2003
  3. Jan

    OpenFileDialog?

    Jan, Oct 24, 2003, in forum: ASP .Net
    Replies:
    8
    Views:
    2,699
  4. Jaydeep
    Replies:
    3
    Views:
    1,064
    vedcyrus
    Jun 30, 2006
  5. Replies:
    0
    Views:
    337
Loading...

Share This Page