server.mappath()

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 16
Reputation: ssreevidya.m is an unknown quantity at this point 
Solved Threads: 0
ssreevidya.m ssreevidya.m is offline Offline
Newbie Poster

server.mappath()

 
0
  #1
May 14th, 2009
hi,

what is the use of server.mappath().
what is the return value of this method.

Thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 6
Reputation: tonykmathew is an unknown quantity at this point 
Solved Threads: 0
tonykmathew tonykmathew is offline Offline
Newbie Poster

Re: server.mappath()

 
0
  #2
May 14th, 2009
The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.

returns string
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 16
Reputation: ssreevidya.m is an unknown quantity at this point 
Solved Threads: 0
ssreevidya.m ssreevidya.m is offline Offline
Newbie Poster

Re: server.mappath()

 
0
  #3
May 15th, 2009
Thank you for your answer.

But I couldn't get the concept relative or vortual path.Could you please describe it for me.

Thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 37
Reputation: shefeekj has a little shameless behaviour in the past 
Solved Threads: 2
shefeekj shefeekj is offline Offline
Light Poster

Re: server.mappath()

 
0
  #4
May 15th, 2009
The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 37
Reputation: shefeekj has a little shameless behaviour in the past 
Solved Threads: 2
shefeekj shefeekj is offline Offline
Light Poster

Re: server.mappath()

 
0
  #5
May 15th, 2009
It returns the physical path of the file or directory from the virtual path. As we setup a site in a remote server we don't have access to the server root path of our site in case of shared hosting. As our site is stored inside a particular folder of the server and by browser or by ftp access we can't move upward to wards the root of the server so it is not possible to get the physical path of any directory or file. Some of the objects like FileSystemObject requires physical path to handle various file and directory related commands. So here we can convert a virtual address of path to physical path by using Server MapPath method.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 220
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 33
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training

Re: server.mappath()

 
0
  #6
May 17th, 2009
HI,
Why you do not try with below code:
  1. Response.Write(Server.MapPath("any folder name within the root"));

Hope now you can understand.
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC