ASP.NET MVC1 -> MVC3
string path = HttpContext.Current.Server.MapPath("~/App_Data/somedata.xml");
ASP.NET MVC4
string path = Server.MapPath("~/App_Data/somedata.xml");
MSDN Reference:
More Related Contents:
- Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction
- Fake DbContext of Entity Framework 4.1 to Test
- How can I get my webapp’s base URL in ASP.NET MVC?
- New asp.net charting controls – will they work with MVC (eventually)?
- “The resource cannot be found.” error when there is a “dot” at the end of the url
- How to convert View Model into JSON object in ASP.NET MVC?
- MVC4 HTTP Error 403.14 – Forbidden
- Windows update caused MVC3 and MVC4 stop working
- Parser Error Message: Could not load type ‘TestMvcApplication.MvcApplication’
- How to change default view location scheme in ASP.NET MVC?
- Create virtual directory on same azure web app
- Cannot attach the file *.mdf as database
- How to create a CheckBoxListFor extension method in ASP.NET MVC?
- Using scripts in a master page with ASP.NET MVC
- Where and how is the _ViewStart.cshtml layout file linked?
- Connection string using Windows Authentication
- .NET MVC Call method on different controller
- Can’t find ADO.net Entity Data Model template in VS2017
- What does Html.HiddenFor do?
- ASP.NET MVC security patch to version 3.0.0.1 breaks build [duplicate]
- Where to run a duplicate check for an entity
- How do I improve ASP.NET MVC application performance?
- Could not load file or assembly ‘Antlr3.Runtime (1)’ or one of its dependencies
- How to send an email with attachments using SmtpClient.SendAsync?
- How to throw a SqlException when needed for mocking and unit testing?
- ASP.Net MVC Redirect To A Different View
- The model backing the ‘ApplicationDbContext’ context has changed since the database was created
- ASP.NET MVC on IIS6
- How to Convert Row to Column in Linq and SQL
- Integrate existing ASP.NET MVC application with Orchard CMS