I have a client side dropdown populated with value and text.
$("#ddlSalesRep").append($("<option value=" + SalesRep.UserId + ">" + SalesRep.LastName +", "+ SalesRep.FirstName +" - " + SalesRep.CustomerId + " </option>"))
My requirement is I need to loop through the dropdown, find a specific value and set that as the selected.
In my case SalesRep.UserId is the value field. I want to find a specific sales rep with a user id and set that as the selected.
I would appreciate if anyone could help. Also please send me a link which I can refer for Jquery.