How to Prevent User from Entering HTML
How to disable/Prevent/Don't allow the User from Entering HTML tags in Textbox/TextArea in ASP.NET
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Sep 30, 2014, 1:20 AM EDT
You can use
Regex rgx = new Regex("<[^>]*>");
Regular expression validator.
Hope this will help.
Abhishek