Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi..

I want to display a PDF document into my web page using HTML object data,so i need to pass file path into object data if i use relative path means it support but absolute path means this object data does not support
Posted
Comments
SundararamanS 7-Aug-15 9:00am    
check this ..this might help

http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CCQQFjABahUKEwi3nbzXg5fHAhUSHY4KHSqaBOU&url=http%3A%2F%2Fwww.codeproject.com%2FArticles%2F142013%2FThere-is-something-about-Paths-for-Asp-net-beginne&ei=F6zEVfe1NJK6uASqtJKoDg&usg=AFQjCNGuwUZKPkFqujPk5oDwC67cOP3DVg&bvm=bv.99804247,d.c2E

1 solution

It depends on how HTML is served up. If you load it locally in a Web browser, without using any HTTP server, you can use absolute file path. But this is not how HTTP server works. Normally, it cannot provide access to any files on the host where the HTTP server is hosted except those limited to the root directory set up for your site. Therefore, your URLs should use the path relative to the HTML file using it, or relative to the root; the syntax for this root directory is "~".

—SA
 
Share this answer
 
Comments
marulraj 10-Aug-15 8:40am    
when i used ~ symbol ,local web browser also does not support file path....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900