We can set selected item in multiple dropdown list by using two methods.
1. FindByText
2. FindByValue
FindByText :
In FindByText method search item by text and set selected.
dorpdownId.Items.FindByText("Some Text").Selected = true;
FindByValue :
In FindByValue method search item by value and set selected.
dorpdownId.Items.FindByValue("your value").Selected = true;
No comments:
Post a Comment