Server.MapPath just transforms a "URL" path into a physical path. It doesn't
care where the file is or even if a file named this way exists.
Server.MapPath( "file.txt") will just return a path to this file (wether it
exists or not) relative to the directory of the currently executing page.
You'll have to fix the path in Server.MapPath such as
Server.MapPath( "~/myreports/CrystalReportSu mmary.rpt").
See the doc for details...
--
Patrice
"Craig" <No****@hotmail .com> a écrit dans le message de
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
In my code I have this line of code....
CrystalReportVi ewer1.ReportSou rce =
Server.MapPath( "CrystalReportS ummary.rpt")
I moved the file, CrystalReportSu mmary.rpt, and I get an error.
The value for Server.MapPath( "CrystalReportS ummary.rpt") is the old path,
not the new one.
Is this not supposed to be dynamic? How can I correct this?
Thanks