dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: ASPNET
Expertise: Intermediate
Mar 17, 2002

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


The MapPath method

The ASP.NET Page object exposes the MapPath method, which converts a virtual path into a physical path, so it' is useful for passing arguments to objects that don't work with virtual paths:

Dim sr As New System.IO.StreamReader(Me.MapPath("/data/values.dat"))
You can also use MapPath to retrieve information onabout the current ASP.NET application, for exampleas you see in this snippet:

' The current directory 
Dim currDir As String = Me.MapPath(".")
' The parent directory
Dim parentDir As String = Me.MapPath("..")
' The root directory
Dim rootDir As String = Me.MapPath("/")
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date