I have an MVC page that needs to submit the selected value from a group of radio buttons.
I use:
var data = $.makeArray($("input[type=radio]").serializeArray());
To make an array of their names and values
and then post it with jQuery's ajax() to the MVC controller
$.ajax({
url: "/Rounding.aspx/Round/" + $("#OfferId").val(),
type: 'POST',
dataType: 'html',
data: $.toJSON(data), // <-- jQuery plug in to convert to json string
contentType: 'application/json; charset=utf-8',
beforeSend: doSubmitBeforeSend,
complete: doSubmitComplete,
success: doSubmitSuccess
});
Which sends the data across as native JSON data.
You can then capture the response stream and de-serialize it into the native C#/VB.net object and manipulate it in your controller.
To automate this process in a lovely, low maintenance way, I advise reading this entry that spells out most of native, automatic JSON de-serialization quite well.
Article on MVC JSON deserialization
... and because Stack OVerflow won't let me post 2 links because I'm "new" you will have to google "jquery-json google code" to find the jQuery JSON plug-in I'm using.
I hope this helps!