There is another way to solve this problem instead of using QueryString collection.
Say if you have URL like this -
<a href="@Url.Action("Test", "Model" , new { planid="RAT500" ,validity="120" })">hi<a>
Then have corresponding action like this -
public class ModelController : Controller
{
public ActionResult Test(string planid, string validity)
{
return null;
}
}
And when you click the link, your values will be there in the parameters as shown below -
And say you have other QueryStrings as shown below -
<a href="@Url.Action("Test", "Model" , new { planid="RAT500" ,validity="120", name = "rami"})">hi<a>
Then you can get other QueryString as shown below -