I'm calling an action name PaymentStatus
with a query string and I'm binding query string parameters with my model.
Here it is.
[HttpGet("PaymentStatus")]
public ActionResult PaymentStatus([FromQuery]ResponseMsgVM res)
{
return Redirect(@"http://localhost:27089");
}
Now problem is that I want to Redirect to another URL with the query string of the current request.
Please help me how can I do this?
Extract current query string from request and include in redirect URL
[HttpGet("PaymentStatus")]
public ActionResult PaymentStatus([FromQuery]ResponseMsgVM res) {
var queryString = Request.QueryString;
//use querystring to build redirect URL
return Redirect(@"http://localhost:27089" + queryString);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With