I have an action in controller like:
public ActionResult Index(string ssn)
{
}
and default route values: {controller}/{action}/{id}
I don't want use url like /Home/Index?ssn=1234
. I want use like /Home/Index/1234
.
But I also don't want to add new route values for ssn parameter (or custom model binder).
Is there some complete attribute, like [ActionName]
but for parameters?
Something like this:
public ActionResult Index([ParameterBinding("id")] string ssn)
{
}