views:

22

answers:

1

Hi all,

I have just realized that, by chance, I implemented a category browse type situation in my project:

// GET: /Category/Browse?Category=Fruit
public ActionResult Browse(string category)
{
    ...
}

It turns out this is special case and there must be something behind the scenes. My next one I want to implement something like

//GET: /Category/Browse?Color=Blue
public ActionResult Browse(string color)
{
   ...
}

You get the idea...

Where/how do I register the different url values?

+1  A: 

You don't need to register anything. Action parameters are automatically mapped to URL values by the default model binder. You can also map to complex type, list and dictionary parameters.

Darin Dimitrov