In one of my controllers, I used the following code:
if (Request.IsAjaxRequest()) { return RedirectToAction("PreviewAndSendEmail"); }
I debugged it and it returned to the return line, but no redirection occurred. Is it possible to do this inside Ajax.BeginForm? Here is the razor code,
using(Ajax.BeginForm( new AjaxOptions { LoadingElementId = "loading" })) { <b>Choose E-mail Template : </b>@Html.DropDownList("emailtemps")<br /><br /> <input type="submit" value="Preview & Send" /> <span id="loading" style="display: none;"> <img title="loading..." alt="load" src="@Url.Content("~/Content/App_Icons/gifs/loading.gif")" </span> }
ajax asp.net-mvc asp.net-mvc-ajax
tugberk
source share