i have four dropdown lists, upon selecting each dropdown list in asp.net page textbox field should fill the value, which user selected in dropdownlist page, there is no SQL business here, for ex, ddl1 contains...Tiger Lion Deer ddl2 contains...Siberia RSA Namibia ddl3 contains...Carnivore Carnivore Herbivore
if users select tiger from ddl1, siberia from ddl2 and cornivore from ddl3, textbox field should update as, Tiger Siberia Carnivore i have used StringBuilder with append class below like this,
public List<StringBuilder> GetAnimalDetails()
{
StringBuilder typo = new StringBuilder();
typo.Append(DropDownListBranch.SelectedValue);
typo.Append(" ");
typo.Append(DropDownListMilestone.SelectedValue);
typo.Append(" ");
typo.Append(DropDownListType.SelectedValue);
typo.Append(" - ");
typo.Append(DropDownListVersion.SelectedValue);
return typo.ToString().ToList();
}
SelectedText
instead ofSelectedValue
incase you are not getting proper text. @Vanest - Lol. Timing. – Matt MurdockSelectedText
will give you the text that you can see in the dropdown whereasSelectedValue
will give you the value associated with each of those items. So are you getting any errors/exceptions ? – Matt Murdock