I get a duplicate name attribute while validating through https://validator.w3.org
@Html.EditorFor(model => model.User_Name, new { htmlAttributes = new { @class = "form-control", id = "txtFullNameRealtor", @Name = "txtFullNameRealtor", placeholder = "Full Name" } })
I get this in the html source
<input Name="txtFullNameRealtor" class="form-control text-box single-line" id="txtFullNameRealtor" name="User_Name" placeholder="Full Name" type="text" value="" />
As you can see there,two name attributes are generated that is Name="txtFullNameRealtor"
and name="User_Name"
.
Is there a way to make it generate a single name attribute ?
And I want the Name attribute be explicitly set by me to be there.