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: