asp.net mvc - How to read my String correctly in html and mvc? -



asp.net mvc - How to read my String correctly in html and mvc? -

i'm using mvc, getting message way

[httpget] public virtual actionresult message(int id) { models.userr.message model = new models.user.message(); string getmessage = userservice.getmessage(id); model.message = getmessage; homecoming view(model); }

then in view i'm writting in view:

<label>@model.message</label>

and writting in screen, example:

hello <a href="https://www.google.com">google</a>.

yet, beingness read string. problem , question is: can utilize in either mvc (in controller) or html (in view) in order observe link.

also i'm using userservce.getmessage(int id) message related id table of errors.

i think you're looking raw

<label>@html.raw(model.message)</label>

this write model.message's contents html instead of text.

asp.net-mvc html5

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -