Request.ApplicationPath is returning an empty string.

Discussion in 'ASP.NET 2.0' started by CCMint, Sep 24, 2007.

  1. Hey,

    I am trying to use Request.ApplicationPath to create a url but its returning an empty string and my url is created without www.websitename.com/mypage/tabid/32/default.aspx instead it comes back as /mypage/tabid/32/default.aspx throwing a server not found message.

    how can I get the virtual application's root path?

    thanks, john
     
  2. To get application's root directory path ,you can use Server.MapPath('/').

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page