I think by default the framework throws an exception if you enter tags in an
input field (check out ValidateInput). But if you want to let them enter it,
on the back end you can either use htmlEncode to make it harmless, or
regex.replace to replace the tags with empty strings (try regexlib.com for
examples).
Bill
"Nicky" wrote:
hi, all
I know we can do this by some jscript. But is there a way to do it in
asp.net c# code?
In our project, users could sumit a piece of html code and I need to remove
all html tag out. What's the better way to do this?
Thanks and have a wonderful holiday!