"Server.Mappath" and saying it is not declared

Discussion in 'Hosting Services / Control Panel' started by johnpavelka, Dec 6, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. yes, it isnot in my intellisense. It is underlying 'Server' in "Server.Mappath" and saying it is not declared.If it is working for you, please give me the Namespace. I'll keep searching. Don't waste your time.

    jP


    Post Edited By Moderator (Joel Thoms) : 12/6/2006 9:59:07 PM GMT
     
  2. Is it a page(web form) or a class?Because 'Server.Mappath' is a built in object and should show up if its a web page ,but will not if its a class.In the later case,you will have to use 'HttpContext.Current.Server.MapPath(..)'.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thank-youl. Yes it was in a class. I got my hardcoded "e:" path to work, but this will be better. Thanks again for your patience. I'm kind of a newbie. Have a good one.

    jP
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page