Reputation: 11735
I want to use the Html.Encode by replacing Name <%=Html.TextBox("Name", Model.projectModel.Name)%>
However, since i`m using jquery, How I can still keep the name of the texbox?
Is it possible to use Html.encode and still keep the name of the textbox?
Upvotes: 1
Views: 908
Reputation: 12431
I think you're looking for this:
<%= Html.TextBox("Name", Html.Encode(Model.projectModel.Name)) %>
Upvotes: 2