how to select multiple checkboxs from dropdown and submit
Here is my markup
<asp:DropDownList ID="chkveg" runat="server" multiple="multiple" CssClass="btn btn-default " placeholder="Select Category">
</asp:DropDownList>
<asp:HiddenField ID="hfSelected" runat="server" />
<asp:Button Text="Filter" runat="server" OnClick="Country_Changed" CssClass="btn btn-info"/>
{
if (!Page.IsPostBack)
{
string conStr = ConfigurationManager.ConnectionStrings["DB"].ConnectionString;
SqlConnection con = new SqlConnection(conStr);
DataSet ds = new DataSet();
try
{
con.Open();
string sql = "SELECT ID, M_Roles FROM MembersRoles";
SqlDataAdapter da = new SqlDataAdapter(sql, con);
da.Fill(ds);
chkveg.DataSource = ds;
chkveg.DataTextField = "M_Roles";
// ddlRole.DataValueField = "ID";
chkveg.DataBind();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message.ToString());
}
finally
{
ds.Dispose();
con.Close();
}
}
}
protected void buttonSend_Click(object sender, EventArgs e)
{
}