What does Server.MapPath do?

Answers were Sorted based on User's Feedback



What does Server.MapPath do?..

Answer / sowmya

Maps a virtual or relative path to a physical path.

Syntax:
x = Server.MapPath( string )

Parameters:
string - string containing the path to be translated

The method returns new string containing the physical path
corresponding to the path (virtual or relative) in the
passed parameter.

Example:
JScript/VBScript:

<%= Server.MapPath("/databases/database1.mdb") %>

Is This Answer Correct ?    4 Yes 2 No

What does Server.MapPath do?..

Answer / kishore maddineni

The MapPath method maps a relative or virtual path to a
physical path. This method does not check for the validity
or the existence of the physical path. If the path starts
with a forward or backward slash, the method returns the
path as if the path is a full virtual path. If the path
does not start with a slash, then the method returns the
path relative to the directory of the ASP file being
processed

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More ASP Interview Questions

What should be used in order to determine if the cookie "FavoriteFlavors" in the request object contains more than one entry? A. Request.Cookies("FavoriteFlavors").HasItems B. Request.Cookies("FavoriteFlavors").Collection.Count C. Request.Cookies("FavoriteFlavors").Dictionary D. Request.Cookies("FavoriteFlavors").HasKeys E. Request.Cookies("FavoriteFlavors").Count

1 Answers  


How do I change a aspx file to a pdf?

0 Answers  


What is n-tier system?

0 Answers  


In which database is the information, such as membership, role management, profile, and Web parts personalization, stored?

1 Answers   MindCracker, Muthoot Group,


Which choice is NOT a property of Dictionary Object? A. Key() B. CompareMode C. Item () D. Exists () E. Count

1 Answers  






What does active server pages look like?

0 Answers  


What is querystring collection in asp?

0 Answers  


What is a Cookie? What are the uses of Cookies?

1 Answers  


what is the difference between #include directory in C,C++ and import java.packages in java

0 Answers   Genpact,


textbox has viewstate property,but it does not depend on its property to retain their data across page,Explain.

0 Answers  


Can .net framework components be used from a com program?

0 Answers  


What is IIS?

2 Answers  


Categories