views:

25

answers:

2

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 :)

+1  A: 

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

bluevoodoo1
+1  A: 

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