title: Is there a way to integrate LIST(of String) with SQL Server database?
body: <p>In the past, when we need to exclude members that fall into a certain category, we have used generic.list controls to do so as the example below shows:</p>
  
  <p>First we do a query to list ALL eligible users who meet certain criteria.</p>
  
  <pre><code>sql="select ... from ourTable where certain conditions are true'
  </code></pre>
  
  <p>Then, we list certain groups in the list below and anyone user whose group is in that list will be excluded from participating.</p>
  
  <pre><code>        Dim listOfGroups = New List(Of String)(
           { _
                "ML02A", "ML02B", "ML03", "ML04", "ML05", "ML06", "ML07A", "ML07B", "AP05", _
               "AP06", "AP07A", "AP07B", "AP09A", "AP10", "AP12A" _
          })
  
          If Not listOfGroups .Contains(txtPre.Text) Then
              lblNA.Text = "Members in group&lt;b&gt;" &amp; txtPre.Text &amp; "&lt;/b&gt; are not eligible to participate in this event."
          End If
  </code></pre>
  
  <p>This has always worked beautifully for us.</p>
  
  <p>This time around, the list is well over 200,000; too many to manually include in the list below.</p>
  
  <p>Is it possible to integrate list with SQL Server database?</p>
  
  <p>Or perhaps, is there a way to handle this using stored proc and emitting the same exclusionary message via our asp.net app?</p>
  
  <p>Our app is written in vb.net but I would be more than happy for any c# solutions that I can convert to vb.net</p>
  
  <p>Can generic.list control be used like wildcard in sql server?</p>
  
  <p>For instance, in SQL Server, we could say, if group LIKE 'KT%' then message.</p>
  
  <p>Can LIKE be used in generic.list control?
  Thanks alot in advance.</p>