Bill Crawley
Jul 28th, 2011, 04:39 AM
Hi All,
In my MVC Project I have a couple of Hidden values in the Form
@Html.Hidden("policyZoneID", ViewData["policyZoneID"])
Now in my Script I currently Have:
var jSonData = '{ "available" : " ' + availableArray +
'", "unavailable" : " ' + assignedArray + '"}';
$.ajax({
type: 'POST',
url: '/PolicyZone/JsonEditFloatingZone',
data: jSonData,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (response)....
I want to grab the hidden values and attach them to my jSonData variable to pass to my controller.
Also as an aside, is there an easy way to pass the Model in this context?
In my MVC Project I have a couple of Hidden values in the Form
@Html.Hidden("policyZoneID", ViewData["policyZoneID"])
Now in my Script I currently Have:
var jSonData = '{ "available" : " ' + availableArray +
'", "unavailable" : " ' + assignedArray + '"}';
$.ajax({
type: 'POST',
url: '/PolicyZone/JsonEditFloatingZone',
data: jSonData,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (response)....
I want to grab the hidden values and attach them to my jSonData variable to pass to my controller.
Also as an aside, is there an easy way to pass the Model in this context?