U have to bind the value of dropdownlist on postback.
If(!IsPostBack)
{
LocationBind();
}
Public void Location()
{
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
con.Open();
location.DataSource = cmd.ExecuteReader();
location.DataTextField = "Location";
location.DataValueField = "Id";
location.DataBind();
con.Close();
}
and also pass the value
cmd1.Parameters.AddWithValue("@Location", location.SelectedValue);