How to handle QueryStrings using web pages WebPageRouteHandler RRS feed

  • Question

  • User1122679459 posted

    I have a search page that when the form is submited passes a query string ?storeName=Dell but my Store.cshtml needs to receive a url like this /Store/StoreName in order for the routing to work I guess.

    I there a way to handle query string when using WebPageRouteHandler?

    This is how my route is set up in the _AppStart file.

    RouteTable.Routes.MapWebPageRoute("Store/{name}", "~/Store.cshtml");

    Friday, March 3, 2017 6:36 PM


All replies