I want save path to file after postback in FileUpload asp.net controls like:
function GetPathToDownloadPictures() {
var pathToDownLoadPicture = document.getElementById('<%= UploadPicturesNews.ClientID %>').value;
document.getElementById('<%= PathToPicturesHidden.ClientID %>').value = pathToDownLoadPicture;
}
window.document.onload = AddPathToUploadControl();
function AddPathToUploadControl() {
var pathToDownLoadPicture = document.getElementById('<%= PathToPicturesHidden.ClientID %>').value;
document.getElementById('<%= UploadPicturesNews.ClientID %>').value = pathToDownLoadPicture;
}
Add path from FileUpload to HiddenField and after postback add Path from HiddenField to FileUpload, but not working….
Help me
The original file path is not available any more in modern browsers, as this information is regarded a security risk.
Depending on the browser, you either do not receive any path information, or c:\fakepath on IE.