This is a migrated thread and some comments may be shown as answers.

[Solved] Need to put two dropdown lists in a View

2 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lavanya
Top achievements
Rank 1
Lavanya asked on 03 May 2011, 07:10 AM
Hi,
I am working on ASP.NET MVC.
I need to place two drop down lists side by side.
1. Application List
2. Versions in each application selected.

Once I select the application from first drop down list, I need to get the versions in that particular application.

How can I query this?
My View currently has application drop down list as follows:

 <% using (Html.BeginForm())
    { %>
       <%: Html.ValidationSummary(true, "creation was unsuccessful. Please correct the errors and try again.") %>
                 
                  <fieldset>
                <legend>Select an Application</legend>
               <div class="editor-label">
                   <%: Html.LabelFor(m => m.AppID)%>  
               </div>
               <div class="editor-field">
               
               <%:Html.DropDownListFor(m => m.AppID, new SelectList(Model.application, "ID", "Name"), "--Select Application--", new { Style = "width:150px" })%>

               </div >  
                <input type="submit" value="Save" />
                    </fieldset>
        <% } %>


Let me know the ways to do this!

Regards,
Lavanya

2 Answers, 1 is accepted

Sort by
0
Accepted
nachid
Top achievements
Rank 1
answered on 03 May 2011, 09:05 AM
Here it is: Cascading combo boxes, from the Code Library section

Would be better if you have posted this in the Combobox section
0
Lavanya
Top achievements
Rank 1
answered on 03 May 2011, 11:45 AM
Hi nachid ,

This is exactly what I was looking for!!!!

Thanks a million:)

Regards,
Lavanya:)
Tags
General Discussions
Asked by
Lavanya
Top achievements
Rank 1
Answers by
nachid
Top achievements
Rank 1
Lavanya
Top achievements
Rank 1
Share this question
or