Reputation: 178
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?
Upvotes: 2
Views: 159
Reputation: 5895
Use RedirectToAction("Action", "Controller")
method:
return RedirectToAction("QuoteDetails", "quote");
Upvotes: 4