in my page i have an int variable name mySerial and i want to pass a value from a script
mySerial =ui.item.Serial is not working
you could pass value from your jquery to controller action like this ...
$(document).ready(function()
{
var postdata = { name: "your name", Age: "your age" };// you can pass control values
$.ajax({
ur: /home/index,
data: postdata,
success: function(returndata)
{
// do something here for the return data...
}
});
});
in your controller
public ActionResult PostedDAta(string myname, string myage)
{
// do somethign here and return Json back to Jquery code
return Json(data,JsonRequestBehaviour.AllowGet);
}