Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 230565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:51:36+00:00 2026-05-11T19:51:36+00:00

I am using ASP.NET MVC and want to update content on my page based

  • 0

I am using ASP.NET MVC and want to update content on my page based on the selected value of an HtmlHelper.DropDownList. I have an Admin page on which I would like to display a list of hired employees for a given semester, without having to redirect to another controller. Perhaps a table could be generated or a ListBox filled with these users.

In my database, I have a table containing a list of semesters, a table containing a list of users, and another table with two FK-related fields linking each semester with all the users who are hired for it.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:51:36+00:00Added an answer on May 11, 2026 at 7:51 pm

    Have an action that returns a PartialViewResult containing the mark up your display. Your dropdown list will have the semester as the text and associated database key as the value. Add a change handler to the dropdown list that does an AJAX get to the action that renders the partial view and pass the semester key value to the method as part of the url. Replace the container that should hold the partial view with the results of the AJAX query.

    View

    $(function() {
      $('#SemesterSelect').change( function() {
          $.get( '<%= Url.Action('ListEmployees') %>/' + $(this).val(), function(data) {
             $('#EmployeeList').html(data);
          },
          'html');
      });
    });
    
    
    <%= Html.DropDownList("SemesterSelect",
                            (IEnumerable<SelectListItem>)ViewData["Semesters"]) %>
    
    <div id="EmployeeList"></div>
    

    PartialView (sample — of type IEnumerable)

    <ul>
    <% foreach (var employee in Model)
       { %>
           <li> <%= employee.Name %> </li>
    <% } %>
    </ul>
    

    Controller

    public ActionResult ListEmployees( int semesterID )
    {
         var employees = db.... // query to get employees
         return PartialView("EmployeeList", employees)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using asp.net MVC. I have control like <%= Html.TextBox(username) %> I want
I want to build a webapplication with a Single Page Interface, using ASP.NET MVC.
I'm using ASP.NET MVC Validation. I want to know in my javascript functions whether
I want to make a login system using ASP.NET (MVC). On the internet, I
We are building a site using asp.net mvc. We want to allow the user
I'm using the ASP.NET MVC in a RESTful resource manner and I want to
Application is asp.net MVC. I want to put a textbox for date using mask.
Using ASP.Net MVC on my Site.Master I have: <head runat=server> <title><asp:ContentPlaceHolder ID=TitleContent runat=server />
I am using asp.net mvc 1.0 and I want to return a XML file
In my ASP.net MVC View I have a dropdown that I want to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.