Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2007, 11:53 AM
Registered User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to amged
Default mappath

what meaning mappath


 
Old July 25th, 2007, 09:47 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

According to MSDN: Server.MapPath returns the physical file path that corresponds to the specified virtual path on the Web server.

If you need specific information on this, let us know.

Regards
Mike

Don't expect too much, too soon.
 
Old July 26th, 2007, 09:37 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

MapPath is used (mostly) when you need to preform I/O operations such as write or read from a text file. Since a text file located at:

www.mysite.com/file.txt

could potentially reside anywhere on the filesystem, map path provides the physical path that we need to write to a file. So:

Server.MapPath("file.txt") will return something like:

C:\inetpub\wwwroot\mysite\file.txt

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: MapPath malhyp Dreamweaver (all versions) 1 October 2nd, 2005 07:06 AM
Server.MapPath johanyu ASP.NET 1.0 and 1.1 Basics 0 October 19th, 2004 12:42 AM
Invalid path for MapPath kondin BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 4th, 2004 11:49 PM
Server.MapPath stu9820 Classic ASP Basics 1 January 9th, 2004 04:16 PM
server.mappath kyootepuffy Classic ASP Databases 1 September 5th, 2003 04:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.