A neat way to build query string in ASP.NET Core #aspnetcore

2 Kicks, 121 Views

Creating query string in code can lead to errors as you have to deal with strings, ampersand and question marks. Fortunately, ASP.NET Core has a static class QueryHelpers which has a function called AddQueryString offers a neat way to build query string in ASP.NET Core. The AddQueryString method has 2 definitions.