Reputation:
I have File Upload control
and when i click on browse button a dialog box
appears from where we can select files as shown below:
But everytime i browse it goes to the location C:\Users\Public\Pictures\Sample Pictures\
. Instead i want a different location like C:\Program Files\
.when clicked on browse button.
How this should be done?
Thanks in advance..!!
Upvotes: 3
Views: 3280
Reputation: 6876
I don't think it's possible to achieve this. As stated here
You are wanting to control the directory location that the browse starts in and not the save path the file is uploaded to, correct? 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
Upvotes: 2
Reputation: 159
This sample code might be helpfull to you
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = @"explorer";
process.StartInfo.Arguments = @" ";
Process.Start(@"c:\windows\"); //your file path here
Upvotes: 0