Home Textbox of editorfor htmlhelper is different for integer type
Reply: 0

Textbox of editorfor htmlhelper is different for integer type

user1235
1#
user1235 Published in July 20, 2018, 1:18 am

I am using to Editorfor for displaying values of a class in the view. I am using MVC . While the textbox properties and appearance are the same for values of string type, the textbox appearance for value of integer is changed and not consistence with the other textbox appearances. I have uploaded a snap of the view as well as the code.

  <tr>
            <td>
                @Html.LabelFor(model => model.Id, "Project Id", new { @class = "control-label" })
            </td>
            <td>

                    @Html.EditorFor(model=>model.Id)

                    @Html.ValidationMessageFor(model => model.Id)

            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.Name, "Project Name", new { @class = "control-label" })
            </td>
            <td>
                <div>
                    @Html.EditorFor(model => model.Name, new { @readonly = "readonly" })
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </td>
        </tr>

enter image description here

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.317191 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO