user1428798
user1428798

Reputation: 1546

redirect to action and concate query string

I have in a variable my query string

string queryString="tri=2&dd=3&order=4&.."

I need to redirect to action with my query string:

return RedirectToAction("Index", "call" new {queryString});

but i'm redirected to call/index/queryString=tri=2&dd=3&order=4&..

I need to be redirected to :

call/index/tri=2&dd=3&order=4&.. how can I do this please?

regards

Upvotes: 0

Views: 2234

Answers (1)

Phan Dinh
Phan Dinh

Reputation: 285

You can try:

return Redirect("~/call/index/" + queryString);

Or

return RedirectToAction("index" + "/" + queryString, "call");

Upvotes: 3

Related Questions