Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How we can register a route in WEB api having query string is product-Id:347DCYA3-FE25DW8350 i taken this as string in the parameter of the action method. i cannot map to the below action method .
Can you help me
this is the route configuration

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


route

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

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


in controller [httpget]
C#
public void get (string productId) { }
Posted
Updated 23-Apr-14 3:59am
v7

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