0

I have a drop down list on my aspx form and what I want is to refresh the site after I select an item from the list. This is my drop down list:

 <%: Html.DropDownListFor(x => x.CompanyUserFilterId, new SelectList(Model.CompanyUsers, "Id", "FirstName", Model.CompanyUserFilterId))%>

I use it to filter the data shown on the form depending on the selected item on the drop down list. Please help :)

Jason Berkan
  • 8,335
  • 6
  • 27
  • 39
Nebojsa Veron
  • 1,407
  • 3
  • 19
  • 36

2 Answers2

1

you'll need to 'refresh' the site with some sort of client side mechanism onchange. A similar solution using JQuery is posted here.

Community
  • 1
  • 1
brianc
  • 1,345
  • 3
  • 14
  • 28
1

The simplest method is probably to trigger an html/javascript onchange-event, and handle that to update your page (or post the form with the selected Id).

Take a look at this: http://blog.wekeroad.com/2008/10/21/asp-net-mvc-dropdownlist-and-html-attributes

SilverSkin
  • 2,192
  • 1
  • 24
  • 28