If the text input is between 'greater Than' and 'less than' symbol, I am unable to save the text. Kindly find a solution to this either in Javascript or ASP.net
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Such symbols are forbidden for security reasons - otherwise someone can simply inject their code. If you need to pass such symbols you should pass them like this : "/<" "/>"
Or Set TextBox attribute ValidateRequestMode = ValidateRequestMode.Disabled
回答2:
If you want to allow HTML tags i.e "<>" then you need to set validateRequest="false" in ASP pages , best thing is to parse those tags using HTML encoder .