So i'm using dropdownlist control by assigning array of string to it. The coding for it i wrote in Page_Load function.
protected void Page_Load(object sender, EventArgs e)
{
string[] Gender = { "Male", "Female" };
DdlGender.DataSource = Gender;
DdlGender.DataBind();
string[] Update = { "Yes", "No" };
DdlUpdates.DataSource = Update;
DdlUpdates.DataBind();
}
and now i want to know how to display the selected string accurately in the dropdownlist after i pressed the button?
Also i'm using this coding to display, it would only display the first string when i selected the second string in the dropdownlist...
protected void BtnSubmit_Click(object sender, EventArgs e)
{
int i;
lblGender.Text = DdlGender.Text;
lblUpdates.Text = DdlUpdates.Text;
}