Discussion in 'ASP .Net' started by poppy, Oct 15, 2003.

  1. poppy

    poppy Guest

    Whenever I use "Directory.getcurrentdirectory" I always
    get "C:\WINDOWS\system32" despite the fact that the code
    is running from a subdirectory of wwwroot.

    Can someone help ?

    How can I get the current directory on a code behind page ?
    I dont want the full "C:\e.t.c. Just the current
    directory name.
    poppy, Oct 15, 2003
    1. Advertisements

  2. Paul W

    Paul W Guest

    Try Server.MapPath()
    search help for "MapPath"
    Paul W, Oct 15, 2003
    1. Advertisements

  3. Poppy

    Poppy Guest

    MAppath give me the full path. All I want is the current
    directory name.

    >-----Original Message-----
    >Try Server.MapPath()
    >search help for "MapPath"
    Poppy, Oct 16, 2003
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page