Tuesday, January 03, 2006

ASP.NET GridView DataFormatString Problem

For DataFormatString Property in the ASP.NET 2.0 GridView to working properly, need to disable the HtmlEncode Property. Because HtmlEncode is on(by default), the data is retrieved from the data store, HtmlEncoded, and then the format string is applied. By HtmlEncoding the value from the data store, we are protecting unsafe script from the data store from being displayed to the client.

5 Comments:

Blogger Michiel said...

yes! talk dirty^H^H^H^H^Hgeek to me!

(just kidding!)

5:30 AM  
Blogger Humano said...

I think im in love now...

7:40 AM  
Blogger Laurel Johnson said...

Thank you for visiting my blog, Harsha, and commenting on The Alley of Wishes.
My goodness you are smart! I am a computer idiot.

2:23 PM  
Blogger Steve said...

I just smile

10:28 PM  
Blogger Larry said...

Hi Harsha,
Thanks for visiting my blog.
Liked your photos.
What camera do you use?

8:56 PM  

Post a Comment

<< Home

Web site analytics Web site analytics