1

i am in a subfolder called "paypal" and im trying to redirect to my mvc page. I have tried these 3 ways The page I am trying to redirect form is a webform

Response.Redirect("../../SubscriptionView/Success/" + pdt.TransactionId.ToString());

Response.Redirect("../SubscriptionView/Success/" + pdt.TransactionId.ToString());

Response.Redirect("~/SubscriptionView/Success/" + pdt.TransactionId.ToString());

and keep getting

HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

... .com:80/paypal/subscriptionview/success/...

See how the redirect has not moved up from the paypal directory? What am I doing wrong?

ChampChris
  • 1,565
  • 5
  • 26
  • 44
  • You shouldn't be using Response.Redirect in MVC. Try [RedirectToAction](http://msdn.microsoft.com/en-us/library/system.web.mvc.controller.redirecttoaction(v=vs.108).aspx) instead. – MikeSmithDev Oct 20 '13 at 15:53
  • I created paypal listener and did it with a webform following their suggestions... thinking now i can move it to a view – ChampChris Oct 20 '13 at 15:57

1 Answers1

2

I figured out how to get it working.

 UrlHelper urlHelp = new UrlHelper(HttpContext.Current.Request.RequestContext);
                    response.Redirect(urlHelp.Action("PaymentError", "SubscriptionView", new { mailId = mailId }));

This returned me from the aspx page that i needed process the response from paypal back to my controller

ChampChris
  • 1,565
  • 5
  • 26
  • 44