How can I use Server.MapPath
-
Hi I wrote this code string root=server.mappath(~/); or string root=server.mappath(~); or string root=server.mappath(/Project); but it does not work, please help me Thanks
-
Hi I wrote this code string root=server.mappath(~/); or string root=server.mappath(~); or string root=server.mappath(/Project); but it does not work, please help me Thanks
suppose your report mypersonal.rpt is in Reports folder then u can use string root = Server.MapPath("~Reports/mypersonal.rpt"); otherwise string root=Server.MapPath("mypersonal.rpt"); may this will help you. please post your comment if this helps you.
-
Hi I wrote this code string root=server.mappath(~/); or string root=server.mappath(~); or string root=server.mappath(/Project); but it does not work, please help me Thanks
The Server.MapPath method maps the specified relative to the corresponding physical path on the server. As for Example.
Server.MapPath("MyFile.txt")
will return the Physical path for file that you have specified ( assume that it is located on root )
-
Hi I wrote this code string root=server.mappath(~/); or string root=server.mappath(~); or string root=server.mappath(/Project); but it does not work, please help me Thanks
Server.MapPath("~"); This returns your root directory Path Enjoy!
Best Regards, Chetan Patel
-
suppose your report mypersonal.rpt is in Reports folder then u can use string root = Server.MapPath("~Reports/mypersonal.rpt"); otherwise string root=Server.MapPath("mypersonal.rpt"); may this will help you. please post your comment if this helps you.