Render span element with text from Model
Is there a way to render text into a span element when an ASP MVC 3 view loads? For instance if I have <span id="territoryName"></span> how would I load the data from Model.Region into the span element as text?
If you are using Razor you can use the following.
Note: the value will be HTML-encoded.