ddl.SelectedIndex.ToString () // ?
ddl.SelectedValue // id usually int
ddl.SelectedItem.ToString() // actual value string
Hi , I am reading about drop down list, and was confused about ddl.SelectedIndex vs ddl.SelectedValue
I realize if I want to extract a column id I will use
ddl.SelectedValue
and if I want to extract a column value I will use
ddl.SelectedItem.ToString()
So, what is ddl.SelectedIndex.ToString () and how I can use it in my code thanks
ehx
ddl.SelectedValue // id usually int
ddl.SelectedItem.ToString() // actual value string
Hi , I am reading about drop down list, and was confused about ddl.SelectedIndex vs ddl.SelectedValue
I realize if I want to extract a column id I will use
ddl.SelectedValue
and if I want to extract a column value I will use
ddl.SelectedItem.ToString()
So, what is ddl.SelectedIndex.ToString () and how I can use it in my code thanks
ehx