asp.net mvc ajax post - redirecttoaction not working

前端 未结 2 864
南旧
南旧 2020-12-18 05:42

I used the following code in one of my controller;

            if (Request.IsAjaxRequest()) {
            return RedirectToAction(\"PreviewAndSendEmail\");
          


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-18 06:28

    Why don't you call the PreviewAndSendMailEmail directly? Since you don't need the redirection itself (change in url,etc), there is no need to use it.

提交回复
热议问题