i want to get select values of jquery select2 plugin in asp.net code behind.
Here is my source
Client Side:
<select id="ddlcountry" runat="server" class="select" style="width: 100%;">
</select>
Code Behind:
var query1 = from pcountry in CTX.Countries
orderby pcountry.Country1 ascending
select new
{
pcountry.CountryId,
pcountry.CountryName
};
if (query1 != null)
{
ddlcountry.DataSource = query1.ToList();
ddlcountry.DataValueField = "CountryId";
ddlcountry.DataTextField = "CountryName";
ddlcountry.DataBind();
ddlcountry.Multiple = true;
}
protected void btnSave_Click(object sender, EventArgs e)
{
Now i want to get all the selected country values here ?
}
Please help me,i will be very thankful.