How to use an OnChange event in a DropDownList after selecting an item

Mollie

New Member
I have a MVC website. And in a page there is a dropdownlist, a detailinfo-view and several list-views.The data comes from imported XML-files such like:\[code\]<?xml version="1.0" encoding="utf-8" ?><Items> <Item ID="1" Name="MVC" Country="Engeland" City="London" Website="http://forums.asp.net" Genre="New" /> ....</Items>\[/code\]Index.page\[code\]<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <script type="text/javascript"> function OnChange(text) { ... } </script> <form id="form1" runat="server"> <br /> <label>Select Name</label> <br /> <%= Html.DropDownListFor(a => a.SelectedItem, new SelectList(Model.Artists, "Value", "Text"), new { onchange = "OnChange(this.Value);" })%> <br /> <br /> <%= Html.Action("DetailInfo") %><br /> <br /> <%= Html.Action("MemberList") %> <br /> <br /> <%= Html.Action("RelationsList") %><br /> <br /> </form></asp:Content>\[/code\]My question is: How can I reuse Html.Actions after an OnChange event by selecting an item in a DropDownList?I want to change the view data when the item of a dropdownlist has changed.I hope to see on the webpage, detail information right under the DropDownList.Country: England

City: London

Website: etc.
Then a list of Members and Relations.Thank you for helping meWesley
 
Back
Top