Re: Server.MapPath & Request.MapPath
- From: Michael Nemtsev <nemtsev@xxxxxxx>
- Date: Sat, 6 Oct 2007 06:47:54 +0000 (UTC)
Hello rn5a@xxxxxxxxxxxxxx,
There are no difference in this aspect, because the Server.MapPath calls the _context.Request.MapPath(path)
inside its method
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo
Server.MapPath returns the physical file path that corresponds to the
specified virtual path whereas Request.MapPath maps the specified
virtual path to a physical path. Assuming that a file named Hello.aspx
resides in C:\Inetpub\wwwroot\MyFolder, the output of both
Response.Write(Server.MapPath("Hello.aspx"))
&
Response.Write(Request.MapPath("Hello.aspx"))
is C:\Inetpub\wwwroot\MyFolder\Hello.aspx. So what's the difference
between Server.MapPath & Request.MapPath?
Thanks
.
- Follow-Ups:
- Re: Server.MapPath & Request.MapPath
- From: Juan T. Llibre
- Re: Server.MapPath & Request.MapPath
- References:
- Server.MapPath & Request.MapPath
- From: rn5a
- Server.MapPath & Request.MapPath
- Prev by Date: Server.MapPath & Request.MapPath
- Next by Date: Re: Identity
- Previous by thread: Server.MapPath & Request.MapPath
- Next by thread: Re: Server.MapPath & Request.MapPath
- Index(es):
Relevant Pages
|