title: Query/Search in SelectList ViewBag with Linq/Lambda expression rather than using foreach loop
body: <p>In controller the selectlist's Viewbag is:</p>
  
  <pre><code>ViewBag.DSUB = new SelectList(db.SUBJECTs, "SCODE", "SUBJECT1");
  </code></pre>
  
  <p>And in view I can check it with certain value by foreach lopp. I need to do the same thing with Linq Comprehension/ Lambda expression to make my code more readable.</p>
  
  <pre><code>string certainStringVariable = '5';
  @foreach (var DSUBName in ViewBag.DSUB)
  {
      if (DSUBName.Value == certainStringVariable)
      {
      @DSUBName.Text
      }
  }
  </code></pre>
  
  <p>I will really appreciate him/her who will relief me from this stuck.</p>