<form action="/WorkforceRequests/GetSelectedDropDownChanged" method="post"> <select class="form-control" id="statusselect" name="statusselect"> <option value="1">Pending Request</option> <option value="2">All requests </option> </select> </form> on controller WorkforceRequestsController public async Task<ActionResult> GetSelectedDropDownChanged() //Assuming key in your dropdown is string { string selectedValue = Request.Form["statusselect"].ToString(); List<WorkforceRequest> workforceRequest = new List<WorkforceRequest>(); if (selectedValue == "1") { workforceRequest = Workforce.GetPendingOnPalnningSection(RoleKey.PLS); } else workforceRequest = Workforce.GetAllRequestsOnPalnningSection(RoleKey.PLS); return View(workforceRequest); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)