Default folder for the FileUpload Controlhttp://forums.asp.net/t/1273605.aspx/1?Default+folder+for+the+FileUpload+ControlFri, 13 Jun 2008 03:37:40 -040012736052414605http://forums.asp.net/p/1273605/2414605.aspx/1?Default+folder+for+the+FileUpload+ControlDefault folder for the FileUpload Control <p>Is there a way to establish a default folder for the Fileupload control?</p> <p>&nbsp;</p> 2008-06-10T22:02:00-04:002414617http://forums.asp.net/p/1273605/2414617.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>You need to set the location during uploading the files using the SaveAs method<br> </p> <p>http://msdn.microsoft.com/en-us/library/aa479405.aspx&nbsp;</p> <p>http://support.microsoft.com/kb/323245&nbsp;</p> <p>http://www.codeproject.com/KB/aspnet/fileupload.aspx#file&nbsp;</p> 2008-06-10T22:08:07-04:002414653http://forums.asp.net/p/1273605/2414653.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>Actually, what I meant was to have the Browse button open explorer to a specific folder. Not necessarilly to the last one visited.</p> 2008-06-10T22:33:33-04:002414801http://forums.asp.net/p/1273605/2414801.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>Check this link and take a look at the code sample and you will find out how to set the path for that control.&nbsp;</p> <p>http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.filecontent(VS.80).aspx&nbsp;</p> <p>Hope this helps&nbsp;</p> <p>&nbsp;</p> 2008-06-11T01:46:19-04:002416766http://forums.asp.net/p/1273605/2416766.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>I must be missing it. The only line in the sample that involves a path is </p> <p>&nbsp;<span style="color:blue">Dim</span> savePath <span style="color:blue">As</span> <span style="color:blue">String</span> = <span style="color:maroon">&quot;c:\temp\uploads\&quot;</span></p> <p><span style="color:maroon">Changeing that value does not impact the file search folder.</span><br> </p> 2008-06-11T16:26:12-04:002416784http://forums.asp.net/p/1273605/2416784.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>By default, the requireRootedSaveAsPath attribute of the httpRuntime configuration element in the Web.config file is set to true, which means that </p> <p>you need to provide an absolute path to save the file.</p> <p>&nbsp;</p> 2008-06-11T16:35:55-04:002416801http://forums.asp.net/p/1273605/2416801.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>You are wanting to control the directory location that the browse starts in and not the save path the file is uploaded to, correct?&nbsp;</p> <p>I could be wrong but since the server never knows the file structure of the client machine, the developers of that control probably did not provide for that functionality.</p> 2008-06-11T16:43:43-04:002417216http://forums.asp.net/p/1273605/2417216.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>You are correct. I think you are the first person who understands the question. And you may be correct that it can't be done.</p> 2008-06-11T19:37:30-04:002420642http://forums.asp.net/p/1273605/2420642.aspx/1?Re+Default+folder+for+the+FileUpload+ControlRe: Default folder for the FileUpload Control <p>Hi,</p> <p>I'm agreed with the above.&nbsp;The dufault value is due to the&nbsp;browser.&nbsp;FileUpload.Value can&nbsp;return the path on the client, but it is read only.</p> <p>So it isn't available unless you can use JavaScript to modify the default directory of dialog box&nbsp;that needs&nbsp;support of the browser.</p> <p>It refers to some security problem, so you had better give it up.</p> <p>Hope it helps.</p> <p>&nbsp;</p> 2008-06-13T03:37:40-04:00