I have a controler:
public class imoveisController : Controller
{
public ActionResult Index(int idEstado = 0, int idCidade = 0, int[] idRegiao = null)
{
string IdEstado;
string IdCidade;
int[] IdRegiao;
#LeOuGravaCookie
#region MontaViewBags
#region RetornaBairros
#region RetornaImoveisDessesBairros
return View(ImoveisRetornados);
}
}
In the view there is a form where the user can select 1 state and 1 city and a set of neighborhoods. And when submitted returns to the Action Index that instead of reading this data a cookie will receive the form, do the search and return the real estate. Running 100% right.
My problem is that on return it displays for p user the following url:
Myth / Real Estate
And I need to return depending on what the user selects on the form If he just reported the status:
mysite / real estate / {statusInformed}
If he also selected a city:
mysite / real estate / {statusInformed} / {CityInformed}
Could anyone help me do this?