Control to pick up Folder Path in ASP .Net
-
Hi, I want to give the user a control to pick up the folder path and as the user selects a folder, the same needs to be assign in one TextBox for saving purpose in my ASP.Net Page (Same like File Browser Control, Input type='file'...). But I am not able to do the same.
-
Hi, I want to give the user a control to pick up the folder path and as the user selects a folder, the same needs to be assign in one TextBox for saving purpose in my ASP.Net Page (Same like File Browser Control, Input type='file'...). But I am not able to do the same.
Hi there. If you do use <input type='file'...> you already have access to the full client file path through the HtmlInputFile.Value[^] property. Just add the
id
andrunat='server'
attributes so you can access the object server-side. -
Hi there. If you do use <input type='file'...> you already have access to the full client file path through the HtmlInputFile.Value[^] property. Just add the
id
andrunat='server'
attributes so you can access the object server-side.Hi, Thanks for the reply. I want to give the user a option to select a folder and not a file. Like for e.g. I want to ask user a path for saving temporary files. The control you are talking about is for selecting a file and not the folder. Thanks in advance !! Chintan
-
Hi, Thanks for the reply. I want to give the user a option to select a folder and not a file. Like for e.g. I want to ask user a path for saving temporary files. The control you are talking about is for selecting a file and not the folder. Thanks in advance !! Chintan
Hi there. I see - I misunderstood your original question. If you are looking to provide a way for users to select a server-based folder, I think a treeview control would work well. If you wish to allow a user to select a client-based folder - well, the closest thing in html is <input type='file'>. If you were developing an intranet application and had some control over the user environment (e.g. browser and security options), you might consider making use of an ActiveX componenet or Java applet. Here's an example that uses FileSystemObject (again, security issues and browser compatibility issues come into play with this approach): http://www.tek-tips.com/faqs.cfm?fid=5201[^]