Reputation: 11
Server.MapPath("/Uploads/CrystalReport1.rpt")
and
Server.MapPath("~/Uploads/CrystalReport1.rpt")
returning address without '\'
D:WEBDATAmydomain.comUploadsCrystalReport1.rpt
but I expected
D:\WEBDATA\mydomain.com\Uploads\CrystalReport1.rpt
Upvotes: 0
Views: 532
Reputation: 50728
Your issue, noted in the comments, is that javascript interprets "\" as a marker for special characters. To output a backslash, you need to use two backslashes, as in "\". For some reason, the output is different. Instead of writing them out from the client, do a Response.Write from the code-behind, and examine the differences there, or even more simply, use VS intellisense to check.
Upvotes: 1