Writing texbox data to a database - strange characters being displayed.

craig32768
craig32768 used Ask the Experts™
on
Hi - I am taking the text from a multi line text box and saving it as a nvarchar(max) field.  When I display the record on a webpage is has loads of strange characters displaying - It looks like people are pasting from MS Word into the text field.

Is there a way in ASP that I can easily stop this happening?

Screen grab of a post attached.

Cheers


screenshot.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
u need to have  a function to cleanup users input

ref
http://www.bestcodingpractices.com/asp_clean_user_input-21.html

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial