James Flower

C# .NET and Web Developer

Tag: query string

There is 1 post with the "query string" tag.

Changing Query String values in ASP.NET MVC

Posted on
2 min read

Recently I was trying to update a query string by adding or updating a parameter for URLs generated in a partial view. I found an excellent example for achieving this by setting route data here however this didn’t preserve current query string values in the URL. I’ve extended upon that code and updated it to include the query string values in the route data which will be appended to the query string in the generated URL (assuming the parameter key doesn’t match part of the route). p

Read more...