I submitted a form via jquery, but I need the ActionResult to return true or false.
this is the code which for the controller method:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult SetSchedule(FormCollection collection)
{
try
{
// TODO: Add update logic here
return true; //cannot convert bool to actionresult
}
catch
{
return false; //cannot convert bool to actionresult
}
}
How would I design my JQuery call to pass that form data and also check if the return value is true or false. How do I edit the code above to return true or false?