Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top