Try this..
Note the inline comments
function fungo() {
var date = new Date();
var link = '@Url.Action("ActionMethod", "Home")';
var args = {
param1: date.toISOString(),
param2: date.toISOString(),
param3: 'somevalue'
};
$.ajax({
type: "GET",
url: link,
data: args,
dataType: "json",
success: function (data) {
window.location.href = data.redirecturl;
},
error: function (httpRequest, textStatus, errorThrown) {
alert("Error: " + textStatus + " " + errorThrown + " " + httpRequest);
}
});
}
Controller:
[HttpGet]
public ActionResult ActionMethod(DateTime param1, DateTime param2, string param3)
{
return Json(new { redirecturl = "http://www.codeproject.com/" }, JsonRequestBehavior.AllowGet);
}