I have this link calling a action called UserSettingsTabsStructure:
@Ajax.ActionLink(User.Identity.Name,"UserSettingsTabsStructure","Account", new AjaxOptions() { HttpMethod = "Get", UpdateTargetId = "conteudoDinamico", OnComplete = "loadDialogSettings" })
Then, when OnComplete is done, I would like to send a json object to a js function called loadDialogSettings.
This is the action:
public ActionResult UserSettingsTabsStructure()
{
return PartialView();
}
How can I do that?
Even if a create a json like this:
public ActionResult UserSettingsTabsStructure()
{
Json(new
{
FormName = "Name",
}, JsonRequestBehavior.AllowGet);
return PartialView();
}
I am not sure how I am gonna return the object with the view().
You want to return the result of the
Jsonextension method: