| | |
server.mappath()
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2009
Posts: 37
Reputation:
Solved Threads: 2
The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.
•
•
Join Date: Apr 2009
Posts: 37
Reputation:
Solved Threads: 2
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.
HI,
Why you do not try with below code:
Hope now you can understand.
Why you do not try with below code:
ASP.NET Syntax (Toggle Plain Text)
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
REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
![]() |
Similar Threads
- How to use server.mappath (ASP.NET)
- Server.mappath is not valid.. (VB.NET)
- Export Data From Excel to ASP and SQL Server (C++)
- C#ASP.Net: how to browse the folder list on Server? (C#)
- .ASP Form, Not emailing w/ CDONTS. Win 2003 Server (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: Update website control from usercontrol?
- Next Thread: hosting error
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible complex content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdown dropdownmenu dynamic dynamically edit editing embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv folder form gridview gudi iis image javascript languages list maps menu mobile mssql nameisnotdeclared novell opera order problem profile ratings redirect refer registration relationaldatabases reportemail response.redirect rows search security select serializesmo.table sessionvariables silverlight smoobjects software sql ssl tracking treeview typeof validatedate validation vb.net vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl





