How to use an OnChange event in a DropDownList after selecting an item
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:

    <?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>

... and a Index.page like this:

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

My question is: How can I reusing 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.


... And I hope to see on the webpage, detail information right under the DropDownList.

**Country: England<br /><br />
City: London<br /><br />
Website: etc.<br />**

... and then a list of Members and Relations.

Thank you for helping me

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

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:

    <?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>

... and a Index.page like this:

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

My question is: How can I reusing 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.


... And I hope to see on the webpage, detail information right under the DropDownList.

**Country: England<br /><br />
City: London<br /><br />
Website: etc.<br />**

... and then a list of Members and Relations.

Thank you for helping me

Wesley