Usually in HTML / CSS, if you want to add placeholder text in a text box, you simply do the following:
<input type="text" class="input-class" placeholder="Please enter your email"/>
But since I am using existing code that provided the login panel in Visual Studio MVC 4:
/Views/Account/Login.cshtml
This is C # code that currently passes inputs:
@Html.TextBoxFor(m => m.Email, new { @class = "form-input" }) @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) @Html.PasswordFor(m => m.Password, new { @class = "form-input" }) @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })

How do you add placeholder text to this C # code? I tried this:
@Html.TextBoxFor(m => m.Email, placeholder ="Email" new { @class = "form-input" })
And he emphasized "placeholder" in the red expression "Placeholder-name" does not exist in the current context. "
source share