My code is
Expand|Select|Wrap|Line Numbers
- <head>
- <script type="text/javascript">
- $(document).ready(function()
- {
- $("#multi").multiselect().multiselectfilter();
- });
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <select id="multi" runat="server" >
- </select>
- </form>
- </body>
My .cs code is
Expand|Select|Wrap|Line Numbers
- protected void Page_Load(object sender, EventArgs e)
- {
- Bind();
- }
- public void Bind()
- {
- SqlConnection con = new SqlConnection("Data Source=ST0022;Initial Catalog=QuickMove_Globe;User ID=sa;Password=good");
- SqlDataAdapter da = new SqlDataAdapter();
- DataSet ds = new DataSet();
- da.SelectCommand = new SqlCommand("Select Name from Sales.ProspectiveLead", con);
- con.Open();
- da.SelectCommand.ExecuteNonQuery();
- da.Fill(ds);
- con.Close();
- multi.DataSource = ds.Tables[0];
- multi.DataBind();
- }