Programming

Using CORS with ASP NET Web API

Posted on

If you are writing an ASP.NET Web API and you want to call it from a JavaScript (CoffeeScript, TypeScript) program on another domain, here are the steps you need to take to make it happen. I know that you are smart and you know what you are doing, so I’m not bulking out this article […]

Programming

Get Your MVC Models Right

Posted on

It seems like every time someone shows off their ASP.NET MVC application to me I have to make the same observation about their models, so I’ve decided to put the explanation online to save myself a great deal of repetition. As we all know, the Model in ASP.NET MVC is how information travels from the […]

Programming

ASP NET MVC Post/Redirect/Get Pattern

Posted on

This is just a quick article to hopefully dispel some common misunderstandings of the ASP.NET MVC Post/Redirect/Get Pattern. First up, a quick explanation of what the Post/Redirect/Get (or PRG) Pattern is for those who don’t know. The Problem With A POST The common problem is that if you submit a form, you end up on […]

Programming

JavaScript Includes and Rewritten URLs

Posted on

I recently answered a question on a forum about JavaScript includes in ASP.NET MVC and as the question came up again today, I thought I’d share the answer with the world. The issue that people are coming up against is that they have a script include with a relative path to their script file. Because […]