My existing code is here:
function opendocpdf_click() {
var docloc = '/App_Data/Test_Project_Documents.pdf'
window.open(docloc);
}
The above code doesn't working, it seems 404.8 not found error. but the below code is working fine, what can i do for above code can work.
function opendocpdf_click() {
var docloc = 'E:/palanisamy/Projects/Sample/App_Data/Test_Project_Documents.pdf'
window.open(docloc);
}
thanks in advance.
ASP.NET will not serve files stored in App_Data
; it is a special folder . If you want the files publicly available, you'll need to do one of the following:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.