954,178 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Preventing XSS issue while using DataGrid

Hi,
I am using DataGrid to display the data from the database. I have used the event ItemDataBound to encode the data coming from the database before being displayed in the grid. Is there any other efficient/recommended method to avoid XSS issue while using DataGrid for displaying data from the database?

Thanks,
Umesh D K

UmeshDK
Newbie Poster
1 post since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

ASP.NET 2.0 GridView HtmlEncode property of Bound Columns is set to true for security reasons (to prevent xss attacks). I think you are working with 1.1 version.

Take a look at this MSDN article - Take Advantage of ASP.NET Built-in Features to Fend Off Web Attacks

__avd
Posting Genius (adatapost)
Moderator
8,647 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You