What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 3893 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > How to use Server.MapPath in Class File ...
Somasundaram

How to use Server.MapPath in Class File

Replies: 2 | Posted by: Somasundaram on 5/18/2012 | Category: C# Forums | Views: 3516 | Status: [Member] | Points: 10  


hi.,

I'm Using Visual Studio 2005,
how to use Server.MapPath inside the Class File

I'm Getting Error as Below:

Error	3	The name 'Server' does not exist in the current context	


Please Anybody tel how to use..

Thanks in Advance...

Regards,
Somasundaram


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Rajkatie
Rajkatie  
Posted on: 5/18/2012 5:23:29 AM
Level: Silver | Status: [Member] | Points: 25

Use HttpContext.Current.Server.MapPath

Rajesh Patel
MCPD,MS
Brainbench (Asp.Net 4.0 and CSS 3.0)

Somasundaram, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Akiii
Akiii  
Posted on: 10/9/2012 2:58:03 AM
Level: Bronze | Status: [Member] | Points: 25

Also you have to have System.Web namespace


Thanks and Regards
Arka Dutta

Somasundaram, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2013 8:28:41 PM