SyntaxFix
Write A Post
Hire A Developer
Questions
I prefer
if(ddl.Items.FindByValue(string) != null) { ddl.Items.FindByValue(string).Selected = true; }
Replace ddl with the dropdownlist ID and string with your string variable name or value.