title: ASP.NET MVC Razor get textbox value
body: <p>How can I get the value of a textbox using razor?</p>
  
  <pre><code>&lt;div&gt;
  &lt;input type="text" id="somevalue" name="somevalue" class="form-control"/&gt;
  &lt;input type="button" value="Search" class="btn btn-success"/&gt;                                                        
  &lt;/div&gt;
  &lt;ul id="ReportsList" class="nav"&gt;
  @foreach (var item in Model){
  var roomName= document.getElementByID('somevalue').value
  if (item.roomName == roomName) {
     &lt;li class="errorItem"&gt;
     &lt;a href="#" class="list-group-item"&gt;
       &lt;i class="fa fa-warning fa-fw"&gt;&lt;/i&gt; @Html.DisplayFor(modelItem =&gt; item.roomName)
       &lt;span class="pull-right text-muted small"&gt;@Html.DisplayFor(modelItem =&gt; item.roomCapacity) pers.
       &lt;/span&gt;
       ..........
       }
  </code></pre>
  
  <p>Is it possible to get the value of the textbox using MVC Razor? Cause using the getElementByID doesn't seem to work in razor...</p>