title: Creating Html Helper using razor for searching
body: <p>I have created a Html helper for searching text given by the user using Razor helper inline.
  The code i have written is as follows;</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $('#companyName').change(function () {
          var searchTerm = $(this).val();
          @Search(searchTerm);
      });
  &lt;/script&gt;
  
  &lt;p&gt;Search For:&lt;/p&gt;
  @Html.TextBox("companyName", Model)
  
  @helper Search(string searchTerm)
   {
      if (searchTerm !="" || searchTerm != null)
      {
          @searchTerm;
      }
      else
      {
          @searchTerm.Substring(0, 7)&lt;text&gt;...&lt;/text&gt;
      }
      }
  </code></pre>
  
  <p>Here i want to pass the value of textbox to the searchTerm. How can I do that..?</p>