What does Server.MapPath do?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of application.lock method?

550


What do the abbreviations asp and jsp stand for?

526


Define application object?

506


Define response object?

530


Enter the roll number of a student and get his marks from a database file called MARKS. Use an ASP code for the same

1790






What is asp and how it works?

529


What is servervariables collection in asp?

505


What is aspx used for?

513


What is the difference between asp and html? Or why asp is better than html?

474


we are doing Design of Placement Website as our academic project. Home page is in c#.net format and register page is in asp.net format. We met a problem in this.register page is not linked in home page. how i complete my project with out any change..?

1557


what is database deployment?

1581


How do I administer security for my machine? For an enterprise?

497


How do I open an asp file in excel?

536


Explain how do you box a primitive data type variable?

496


Explain the post and get method or explain the difference between them?

507