title: how to create an else if statement in Razor?
body: <p>I am trying to display some rows in a table. Depending on the UserGroup, the View should show different markup. An administrator can delete rows, but a moderator can only mark them as visible or invisible.  </p>
  
  <p>How do i write a proper if else statement in Razor?</p>
  
  <p>The page is displayed correctly, but the page title is <b>Parse Error</b></p>
  
  <p>This is my code:</p>
  
  <pre><code>@model MvcApplication3.Models.ViewModels.New.Question.MatrixRows
  
  @{
      bool visible = Model.Visible;
  }
  
  &lt;tr&gt;
      &lt;td&gt;
      @if(visible) 
          {
          @Html.TextBoxFor(cn =&gt; Model.Row_Number, new { @class = "row required digits", size = 1 })
          }
      @if (!visible)
          {
          @Html.TextBoxFor(cn =&gt; Model.Row_Number, new { @class = "row required digits", size = 1, disabled = "disabled" })
          }
      &lt;/td&gt;
      &lt;td&gt;
      @if(visible) 
          {
              @Html.TextBoxFor(bs =&gt; Model.Row_Description, new { @class = "rowdesc", size = 45 })
          }
      @if (!visible)
      {
          @Html.TextBoxFor(bs =&gt; Model.Row_Description, new { @class = "rowdesc", size = 45, disabled = "disabled" })
      }
      &lt;/td&gt;
      &lt;td&gt;
          @if (HttpContext.Current.User.IsInRole("Administrator"))
          {
              @Html.HiddenFor(x =&gt; x.Delete, new { @class = "mark-for-delete" })
              @Html.LinkToRemoveNestedForm("Slet", "tr", "input.mark-for-delete")    
          }
          @if (HttpContext.Current.User.IsInRole("Moderator"))
          {
              @Html.HiddenFor(x =&gt; x.Visible, new { @class = "mark-for-visible" })
              @Html.LinkToDisableNestedForm("Deaktiver", "tr", "input.mark-for-visible")    
          }
          @Html.HiddenFor(id =&gt; Model.Row_Id)
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>