AjaxList delete, return RedirectToAction
I'm working on a feature for my app where the user deletes his user account. The delete button is in a AjaxList; on the server side I'd like to use a RedirectToAction("Login", "Account") as the ActionResult for the Delete() method, but on the client the result expected is Json to update the list. How do you think I should accomplish the redirect?
asked at 01 Nov 2018
well if you want to use `RedirectToAction`, the Delete button has to be non ajax, if it does an ajax request the `RedirectToAction` will redirect to the action which returns a view, so you'll get a string with the view html as a result; how is all this related to reloading the ajaxlist you have, I'm not sure, to reload it you can call the `$('#id').data('api').load();` when you want to reload it.
at 01 Nov 2018
to leave an answer