Display string as html in asp.net mvc view

后端 未结 5 1739
北恋
北恋 2020-12-01 04:22

I have a controller which generate string containing html markups.Now when I am displaying it on views, it is displayed as simple string containing all tags. I tried to u

5条回答
  •  悲&欢浪女
    2020-12-01 04:50

    I had a similar problem with HTML input fields in MVC. The web paged only showed the first keyword of the field. Example: input field: "The quick brown fox" Displayed value: "The"

    The resolution was to put the variable in quotes in the value statement as follows:

    
    

提交回复
热议问题