Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

ASP Best Practices

Previous Topic Next Topic

Paths, Using MapPath

Consider using the MapPath method instead of literal paths in ASP applications. The ASP Server.MapPath method allows you to physically relocate an ASP application without recoding scripts. This saves program modification and maintenance effort.

Performance is affected slightly, because every time you use MapPath in a script, IIS must retrieve the current server path. Consider placing the result of the method call in an application variable in order to avoid retrieving the server path.

© 2016 Microsoft