Suppose your mark up goes like below..
<input type="checkbox" value="1000" name="HTML" id="1" class="box">HTML<br /><br />
<input type="checkbox" name="C" value="1500" id="2" class="box">C#<br /><br />
<input type="checkbox" name="JQuery" value="2000" id="5" class="box">JQuery<br /><br />
<input type="button" id="GetTotal" value="Get total amount"><br />
make an ajax call to server as below sending your data to action method of controller
$(document).ready(function () {
$('#GetTotal').on('click', function () {
var prices = [];
$('input:checked').each(function () {
prices.push($(this).attr("value"));
});
$.ajax({
url: "/Home/ArrayHandler",
type: "POST",
data: {coursePrices:prices},
dataType: "json",
traditional:true,
success: function () {
alert("ajax request to server succeed");
}
});
});
});
Your controller method will go like below
public ActionResult ArrayHandler(IEnumerable<int> coursePrices)
{
return View();
}
Hope this will help you...