Control Attributes render Encoded on dot net 4 - how to disable the encoding?

后端 未结 4 2147
深忆病人
深忆病人 2021-01-20 03:55

I have an issue in asp.net 4.

When I add an attribute on controls, then the render it encoded.

For example, when I type this code

         


        
4条回答
  •  青春惊慌失措
    2021-01-20 04:26

    I ran into this problem with an MvcHtmlHelper for an autocomplete.

    I ended up using |~| instead of ', and then replacing that with ' after Html.TextBox had rendered the string, but before we returned it.

    That's a really annoying "security" feature.

提交回复
热议问题