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

  • SEARCH
  • Home
  • 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 9242993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:42:31+00:00 2026-06-18T08:42:31+00:00

how to remove selected value from drop downs. here is my code. @viewbag.empskil =

  • 0

how to remove selected value from drop downs.

here is my code.

@viewbag.empskil = new selectlist(db.skils,"skillid","skillname");

my view code

@html.Dropdown("skill", @viewbag.empskil as  SelectList);

It Showing all skill in drop down An Employee can Have multiple Skill.
multiple skill are adding with rating .

I just Want to remove Already Selected Skill From Drop down.
can anybody tell me how to accomplish this

here is the screen

enter image description here

I just want if employee having skill these skill will not show in drop down.can any body tell me how it will be done.

  • 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-06-18T08:42:32+00:00Added an answer on June 18, 2026 at 8:42 am

    Sounds like you will need both server-side and client-side code. Server-side, take a list of all skills and a list of employee skills and create a new list using LINQs “Except”, something like:

    var unusedSkills = db.skils.ToList().Except(db.empSkils);
    @viewbag.empskil = new selectlist(unusedSkills,"skillid","skillname");
    

    Client-side, you’ll want to use jQuery to remove a skill from the list after it is selected and add it to the employee’s list, something like:

    $("#button1").click(function(){
        $("#list1 > option:selected").each(function(){
            $(this).remove().appendTo("#list2");
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm updating a variable based on the value selected from a drop-down list, and
I'm trying to remove selected item from ComboBox Collection: I wrote a buttonClick: cb01.Items.Remove(cb01.SelectedItem);.
I'm trying to remove selected item from ComboBox Collection: Items are added manually, as
removeClass doesn't remove the class selected from div.upvote in the js below, but addClass()
I'm trying to re-enable the selected and disabled option from the drop-down list once
Here is my jquery code that was taken from their demo: $(function() { var
Okay so I have two drop downs I want the selected item in dropdown
I have listview control.There is an option to remove selected items.After the user removes
I'm adding a style class to an node if it's selected and then remove
I remove item from ArrayList in foreach loop and get follwing exception. Collection was

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.