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 8686029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:44:00+00:00 2026-06-12T22:44:00+00:00

I am using the JQuery UI Multiselect plugin to use dropdownlist with multiselect items,

  • 0

I am using the JQuery UI Multiselect plugin to use dropdownlist with multiselect items, and I need help to bing the selected items saved in a database back to the multiselect dropdown.

Example:

Javascript code on page load:

$("#<%=ddlCountry.ClientID%>").multiselect({
            checkAllText: "All",
            uncheckAllText: "Clear",
        noneSelectedText: "Select a country",
        selectedText: "# item(s) selected",
        close: function (event, ui) {
            var values = $("#<%=ddlCountry.ClientID%>").val();
            var array_of_checked_values = $("#<%=ddlCountry.ClientID%>").multiselect("getChecked").map(function () {
                return this.value;
            }).get();
            document.getElementById("<%=txtHidDataCountry.ClientID%>").value = array_of_checked_values;
        }
    });

DropDownList ASPX code:

<div id="dvPais" style="display:none">
   <asp:DropDownList ID="ddlCountry" runat="server">
    </asp:DropDownList>
    <input type="hidden" id="txtHidDataCountry" runat="server" />
</div>

On complete submit after select 3 Countries, i have it values like “1,2,3”. When i load the page again, i need to select from the dropdownlist the items 1,2,3. How can i do that?

  • 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-12T22:44:02+00:00Added an answer on June 12, 2026 at 10:44 pm

    just giving the solution i found:

    $("#<%=ddlTeste.ClientID%>").multiselect({
            checkAllText: "All",
            uncheckAllText: "Clear",
        noneSelectedText: "Select a country",
        selectedText: "# item(s) selected",
        close: function (event, ui) {
            var values = $("#<%=ddlTeste.ClientID%>").val();
            var array_of_checked_values = $("#<%=ddlTeste.ClientID%>").multiselect("getChecked").map(function () {
                return this.value;
            }).get();
            document.getElementById("<%=txtHidDataTeste.ClientID%>").value = array_of_checked_values;
        }
    });
    var s = $("#<%=ddlTeste.ClientID%>").multiselect();
    s.val(['1', '2','5']);
    $("#<%=ddlTeste.ClientID%>").multiselect('refresh');
    

    ASPX code:

    <asp:DropDownList ID="ddlTeste" runat="server" multiple>
        <asp:ListItem Value="1">Valor 1</asp:ListItem>
        <asp:ListItem Value="2">Valor 2</asp:ListItem>
        <asp:ListItem Value="3">Valor 3</asp:ListItem>
        <asp:ListItem Value="4">Valor 4</asp:ListItem>
        <asp:ListItem Value="5">Valor 5</asp:ListItem>
    </asp:DropDownList>
    

    Enjoy 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following jquery multiselect plugin ... How can I grab the selected
I am using jquery multiselect plugin, If an option has been selected i would
Using jQuery Multiselect plugin and need to check if any selections have been made
I am using a jQuery multiselect dropdown in ASP.NET I need to get all
So the situation is this: attempting to add a dropdown box using the jquery.multiselect
I'm using the following jquery multiselect plugin ... How can set the selectedText as
I am trying to use Jquery Multiselect plugin from Beautiful site and MVC3 together
I am using a jquery multiselect plugin http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ with option. All works fine, however
I'm using the jquery multiselect control from: http://abeautifulsite.net/notebook/62 I need to manually check one
I am using the multiselect ( multiselect website ) jQuery plugin. It works perfectly,

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.