I have a GetCustomerDetails
method in a controller, in which I am trying redirect to another page. But I was unable to redirect, and it is staying in the same page from where I am trying to redirect.
public ActionResult GetCustomerDetails()
{
.......
// return Redirect("/Quote/QuoteDetails?sc_mode=preview");
string link = "/quote/QuoteDetails";
return Redirect(link);
// return Redirect("../View/quote/QuoteDetails");
// return Redirect("~/View/quote/QuoteDetails");
}
and I tried some of the commented options(above) but still I was unable to redirect.
Can any body help me in this issue?
使用RedirectToAction("Action", "Controller")
方法:
return RedirectToAction("QuoteDetails", "quote");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.