Click here to Skip to main content
15,898,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How we can a map a route to the below action get in WEB api with query string is product-Id:347DCYA3-FE25



this is the route configuration



config.Routes.MapHttpRoute("product", "product/{productId}", new { controller = "product", action = "get" });



route



routes.MapRoute("Default", "{controller}/{productId}", new { controller = "product",



action = "get", id = UrlParameter.Optional });



in controller [httpget] public void get (string productId) { }



i have decoded the value product-Id:347DCYA3-FE25 and pass it as query string still it will not take.....
Posted
Updated 22-Apr-14 4:06am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900