title: Using Linq and the Trim.Text for Search
body: <p>I am trying to convert this test code to C# and having a problem with the Trim command.  Has anyone done anything similiar like this in C# going to use this with a text box for searching the aspx page.         </p>
  
  <pre><code>Dim q = From b In db.Blogs _
          Where b.BlogContents.Contains(txtSearch.Text.Trim()) Or _
                b.BlogTitle.Contains(txtSearch.Text.Trim()) _
          Select b
  </code></pre>