var countries = context.MasterCountries.ToList();
ddlcountry.DataSource = countries;
ddlcountry.DataTextField = "Description";
ddlcountry.DataValueField = "Id";
ddlcountry.DataBind();
<asp:DropDownList runat="server" ID="ddlcountry" CssClass="textbox textbox-reg" />
int countryid = ddlcountry.SelectedIndex;
I am trying to get the id of the company but it's not working.