Currently Browsing: ASP.NET MVC

Creating a proxy with ApiController

I’ve recently moved to MVC 4, and as part of the clean up work I’ve moved a lot of methods I use for AJAX operations to the new ASP.NET Web API, on controllers that inherit from ApiController. When it came to migrate a proxy action, I was amazed to find how much easier it is to build a proxy, with the method only taking a couple of lines. using System; using System.Net.Http; using System.Threading.Tasks; using System.Web.Http; using Http = System.Net.WebRequestMethods.Http; namespace PhilsVersion { public class ProxyController : ApiController { [AcceptVerbs(Http.Get,...
read more

Prototyping UI with ASP.NET MVC

The ASP.NET MVC framework is an incredibly useful tool that changes the application design paradigms for ASP.NET. It simplifies the separation of concerns by insisting the view logic, business logic and model objects aren’t all in the same class! I’m not going to go into the details of what MVC is, but what I want to tell you about is the power of the tools that come with ASP.NET MVC, the integration with Visual Studio and how you can use them to rapidly prototype a user interface with only a vague understanding of what the underlying data will be. What Visual Studio gives you that allows...
read more