I need to check my drop down list for a value before I assign it the myDatatablerow, I have some instances where its not loading the data because its no longer there.
So what I do is load my ddlrecrutier dropdownlist on the page load and tehn i pull information about a person, but if there recruiter no longer exists it bombs out on the assigning of the recruit data to the dropdownlist, how can i check to see if recruiter is in list and it not assign it to zero, to make them pick a recruiter.
This is spot where is this number is not in the dropdownload it bombs out on me with this error
Specified argument was out of the range of valid values. Parameter name: 202
Meaning that persons recrutier is not in the page load of recruiters, so i need to check to see if its existing in the dropdown and if so then assign it else assign it to zero.
I do this on page load
Private Sub LoadRecruiters()
sql = "Select r.intRecruiterRecordID, w.strFullName from tblRecruiter as r INNER JOIN WORSDotNet.dbo.tblUser as w on w.intID = r.intRecruiterID where r.bitActive = 1 Order by " _
& "strFullName, intTeamID"
ddlRecruiter.Items.Add(New ListItem("Pick Recruiter", "0"))