Cross Site Scripting (XSS) used by hackers to break the security in web Application. And this Security vulnerable of web application. And this is done by passing the script into text box, Query String, Cookies, Session variable, Application Variables and retrieve data by external and share resources.
Prevent Cross Site Script enable the RequestValidation page property as True.
-use proper validation on user input.
-always encode user input when processing them.
If data coming from external sources or share sources, never display raw date always encode data before display it to user.
-we can use AntiXSS library to prevent Cross Site Scripting.