Thomas Levesque 1/30/2020

Handling query string parameters with no value in ASP.NET Core

Read Original

This technical article discusses the non-standard nature of query strings and the common convention of using keys without values (e.g., ?foo). It details the problem in ASP.NET Core MVC, where the default model binder fails on boolean parameters without explicit true/false values. The solution involves implementing a custom IModelBinder to interpret empty values as 'true' and missing parameters as 'false'.

Handling query string parameters with no value in ASP.NET Core

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week