Creating a contact form initially as pure html:
<div id="contact-container">
<form class="cf">
<div class="half left cf">
<input type="text" id="input-name" placeholder="Name">
<input type="email" id="input-email" placeholder="Email address">
<input type="tel" id="input-phone" placeholder="Phone">
<input type="text" id="input-subject" placeholder="Subject">
</div>
<div class="half right cf">
<textarea name="message" type="text" id="input-message" placeholder="Message"></textarea>
</div>
<input type="submit" value="Submit" id="input-submit">
</form>
</div>
However, converting to Razor syntax resulted in:
<div id="contact-container">
@Html.BeginForm("Contact", "Service", FormMethod.Post, new { @class = "cf" })
{
<div class="half left cf">
@Html.TextBoxFor(m => m.Name, new { htmlattributes = new { id = "input-name", placeholder = "Name" }})
@Html.TextBoxFor(m => m.Email, new { htmlattributes = new { id = "input-email", placeholder = "Email Address" }})
@Html.TextBoxFor(m => m.Phone, new { htmlattributes = new { id = "input-phone", placeholder = "Phone" }})
@Html.TextBoxFor(m => m.Subject, new { htmlattributes = new { id = "input-subject", placeholder = "Subject" }})
</div>
<div class="half right cf">
@Html.TextBoxFor(m => m.Message, new { htmlattributes = new { id = "input-message", placeholder = "Message" }})
</div>
<input type="submit" value="Submit" id="input-submit">
}
</div>
The converted version appears with unexpected text like System.Web.Mvc.Html.MvcForm {
and excessive semicolons on the webpage. What could be causing this discrepancy?