When the user navigates to a new page, this ddl\'s selected index is determined by a cookie, but if the ddl doesn\'t contain that cookie\'s value, then I\'d like it to be se
Sometimes the value needs to be trimmed of whitespace or it won't be matched, in such case this additional step can be used (source):
if(((DropDownList) myControl1).Items.Cast().Select(i => i.Value.Trim() == ctrl.value.Trim()).FirstOrDefault() != null){}