title: Mixing C# and HTML Helper tags
body: <p>I need to use <code>IF-ELSE</code> conditions to check if the person is named <code>Perry</code>. If so, i need to execute the <code>IF</code> statement, or else if the person name isn't <code>Perry</code> then i will execute the else block.</p>
  
  <p>Even-though they say we could mix <code>C#</code> with <code>HTML helper</code> tags, i am not able to use the <code>IF-ELSE</code> condition as this. The <code>IF-ELSE</code> gets displayed as text. How can i correct my code ?</p>
  
  <pre><code>if(person == "Perry") 
  {
      &lt;div class="content"&gt;
      @using (Html.BeginForm("Go", "MyPro", new { }, FormMethod.Post, new { }))
      {
           @Html.TextBoxFor(mod =&gt; mod.id, new { id = "nameid" }) 
           &lt;input type="text" id="name" name="name" /&gt; 
           &lt;input type="submit" value="send" class="send"/&gt;    
          &lt;/div&gt;
     }
  }else {
      &lt;div class="content1"&gt;
          @using (Html.BeginForm("Come", "MyPro", new { }, FormMethod.Post, new { }))
          {
              @Html.TextBoxFor(mod =&gt; mod.id, new { id = "schoolid" }) 
              &lt;input type="submit" value="Send School" class="submitschool"/&gt;
          }
      &lt;/div&gt;
  }
  </code></pre>