I've read Phil's article ( http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx ) and still can't figure out how I can take json that looks like what I have below and pass it into my contro开发者_StackOverflow中文版ller. I don't have much control over formatting it so I need to take it like this and get the data out of it.
{
"Id":"720",
"SponsorName":"Bay Area Association of Database Developers",
"ImageURL":"~/Images/Sponsors/baadd.org.jpg",
"NavigateURL":"http://baadd.org/",
"HoverOverText":"Bay Area Association of Database Developers",
"Comment":"xx"
}
public class SponsorUpdateModel
{
public int Id {get;set;}
public string SponsorName {get;set;}
public string ImageURL {get;set;}
public string NavigateURL {get;set;}
public string HoverOverText {get;set;}
public string Comment {get;set;}
}
public ActionResult Update(SponsorUpdateModel model)
{
}
精彩评论