my document are saved in C:\Web-Doc\*.pdf
<a href="http://links.10026.com/?link=<%#DataBinder.Eval(Container.DataItem,
rtrim("number")).tostring.trim%>.pdf"><%#
DataBinder.Eval(Container.DataItem, "number") %></a>
if my pdf are stored in the same directory with the source project, I can
open the pdf .
However, if <a href='http://links.10026.com/?link=c:\web-doc\abc.pdf' <-- it said it cannot open the
documnet..
Please helpmy asp program saved in D:\myASP\Project1.
Quote:
Originally Posted by
my document are saved in C:\Web-Doc\*.pdf
>
<a href="http://links.10026.com/?link=<%#DataBinder.Eval(Container.DataItem,
rtrim("number")).tostring.trim%>.pdf"><%# DataBinder.Eval(Container.DataItem,
"number") %></a>
if my pdf are stored in the same directory with the source project, I can
open the pdf .
However, if <a href='http://links.10026.com/?link=c:\web-doc\abc.pdf' <-- it said it cannot open the
documnet..
Please help
That is because the system the browser is running on (do NOT test this
just on your development machine!) does not have a C:\web-doc. This
href point to a local drive, NOT the C: drive of the webserver.
You need something like <a href="http://links.10026.com/?link=servepdf.aspx?file=abc.pdf">...
where serverpdf.aspx accesses that directory outside of the webserver.
It can use Response.WriteFile to send the file to the browser.
Hans Kesting
0 comments:
Post a Comment