I have something like:
<input type="text" name="TerrMng" id="TerrMng"/>
in HTML. What is the equivalent of the above using @Html.Display?
I tried using: @Html.Display("TerrMng", TerrMng)
but was not successful. Note that I like to use @Html.Display but not sure how to translate the ID value so that it shows up.
This should do the trick if you are just wanting to display the data and not allow the user to edit the information.
Edit:
what-is-the-html-displayfor-syntax-for is another question on stackoverflow that may give you some more guidance.
Edit:
TerrMng does not exist on PageLoad so you cannot use the Html.Display in that way. You need to create it and fill its value with the value received from the jQuery. In this case where you would have to do the following:
HTML
jQuery