Guest User

Guest User

  • Tech Writer
  • 43
  • 7.1k

Redirect Another Page.

Apr 28 2021 7:55 AM
I have create a page .cshtml with name(ThankYouPage.cshtml).I want to how to redirect after success ajax.
this is my code
$.ajax({
url: '/Utility/SendMail',
type: "GET",
data: record,
contentType: "application/json; charset=utf-8",
success: function () {
toastr.options.timeOut = 5000;
toastr.success("Query Send Successfully");
$("#form")[0].reset();
window.location.href = "@Url.Action("ThankYouPage.cshtml")";
 
It's not working .Please let me know how it working. 
 

Answers (3)