[HttpPost]
public JsonResult DelayReminder(string reminderId)
{
ReminderStatus rs = new ReminderStatus();
rs.BaseProps.RequesterUserInfo.UserID = SessionManager.Current.CurrentUser.UserID;
ReminderServiceHelper.InsertNewStatus(Convert.ToInt32(reminderId), rs);
return Json(apptype, JsonRequestBehavior.AllowGet); // Problem...
}
Instead of return Json(apptype, JsonRequestBehavior.AllowGet); how can i write below ?
return RedirectToAction("GetLawDetail", "Law", new { _lawID = baseappid });
If anybody wants to see Javascript:
$.ajax({
type: 'POST',
url: '/Reminders/DelayReminder/',
data: {
'apptype': '@ViewData["apptype"]',
'baseappid': '@ViewData["baseappid"]',
'reminderId': $("#reminderId").val(),
'ddlDelayDuration': $("#ddlDelayDuration").val()
},
dataType: 'json',
success: function (result) {
if (result != null) {
}
....
..
How can i return to Law controller to GetLawDetail actionresult inside of jsonresult ?
You can just return this action:
You should also change the return type to Action result as pointed by @im1dermike.
Here's the complete code:
Although, it will return you the whole rendered page.