So I have a User model that I am trying to let the user register with. Its all good but when I select a box to type in the box highlights with a blue color. I don't want this to happen. Also if validation fails the box turns red which I also I don't want to happen. Is this something I can turn off? Or maybe I'm using the wrong thing. I don't know, I'm super new to this and I just want it to look perfect.
So I have something like:
public class User
{
[Key]
public int Id { get; set; }
[Required(ErrorMessage = "Please enter your first name.")]
[Display(Name = "First Name:")]
public string FirstName { get; set; }
[Required(ErrorMessage = "Please enter your last name.")]
[Display(Name = "Last Name:")]
public string LastName { get; set; }
[Required(ErrorMessage = "Please enter your email address.")]
[Display(Name = "Email Address:")]
[DataType(DataType.EmailAddress)]
public string Email { get; set; }
[Required(ErrorMessage = "Please enter a password.")]
[Display(Name = "Password")]
[DataType(DataType.Password)]
public string Password { get; set; }
}
Then in my view I have:
@using (Html.BeginForm())
{
@Html.TextBoxFor(m => m.FirstName, new { @placeholder = "First Name", @class = "TextBoxClass", autocomplete = "off" })
@Html.TextBoxFor(m => m.LastName, new { @placeholder = "Last Name", @class = "TextBoxClass", autocomplete = "off" })
@Html.TextBoxFor(m => m.Email, new { @placeholder = "Email Address", @class = "TextBoxClass", autocomplete = "off" })
@Html.TextBoxFor(m => m.Password, new { @placeholder = "Password", @class = "TextBoxClass", autocomplete = "off", type = "password" })
<br />
<div>
<span>@Html.ValidationMessageFor(m => m.FirstName)</span>
<span>@Html.ValidationMessageFor(m => m.LastName)</span>
<span>@Html.ValidationMessageFor(m => m.Email)</span>
<span> @Html.ValidationMessageFor(m => m.Password)</span>
</div>
<input id="RegisterButton" type="submit" value="Sign Up" />
}
Edit: Showing css for textboxclass below:
.TextBoxClass {
width: 250px;
height: 40px;
font-size: 16px;
font-family: Helvetica Neue, HelveticaNeue, Helvetica, Arial, sans-serif;
text-decoration-color: none;
}