Adding headers in ASP.NET MVC 3

asp.net-mvc-3, c#, http-headers

Solution

Response.AppendHeader("Access-Control-Allow-Origin", "*");

Problem

I have a basic ASP.NET MVC 3 app. I have a basic action that looks like the following: ``` [AcceptVerbs(HttpVerbs.Post)] public ActionResult AddItem(string id, string name, string description, string username) { // Do stuff return Json(new { statusCode = 1 }); } ``` I am trying to let someone access this action via a JQuery Mobile app that will be hosted in Phone Gap. I was told that I need to return `Access-Control-Allow-Origin: *` in my header. However, I'm not sure how to return that in the header. Can someone please show me how to do that? Thank you so much.

Original source