I have created a partial view, the element in the partial view looks like this (Razor Code):
<tr>
<td>
@Html.TextBoxFor(model => model.OtherReferenceNumber,new { @data_slmgui_name= "otherReferenceNumber", @style = "width: 45%" })
@Html.ValidationMessageFor(model => model.OtherReferenceNumber)
</td>
</tr>
I don’t want to use id’s (on input tags). However, when I view the page source, the id attribute appears for the element even though I did not add it. Can any one please explain to me why this appears, and how I can make it stop appearing?
Below is the actual HTML output:
<tr>
<td>
<input data-slmgui-name="otherReferenceNumber"
data-val="true"
data-val-length="OtherReferenceNumber max length is 100"
data-val-length-max="100"
id="OtherReferenceNumber"
name="OtherReferenceNumber"
style="width: 45%;"
value="hjghj"
type="text">
</td>
</tr>
They are automatically generated by Asp.net Mvc to get rid of them do this