0

my action has two 3 parameters, but only two are called at a time. So I want to do this: People is the action, string Height, string searchHigh, sting searchLow

 /Groups/People/Tall/searchHigh

and this

 /Groups/People/Short/searchLow

i map both and the first route works, but the second gets appended to the first when go to the short tab.

zsharp
  • 13,656
  • 29
  • 86
  • 152

1 Answers1

0

You could make the action with only two params, and inside the action you would check if the 1st param is either "short" or "tall" and set your params accordingly:

 public ActionResult People(string Height, string measurementLimit)
    {
    string searchHigh, searchLow;

    if (Height == "Tall")
       searchHigh = measurementLimit;
    else
       searchLow = measurementLimit;
//Rest of your code

    }

Not as elegant as having the route assign the parameters, but it should work.

Hope it helps.

Juan Tarquino
  • 967
  • 7
  • 13