Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

DateTime Formatting in GridView,DetailView,FormView

In Asp.Net 2.0 direct Datetime Formatting for bound column not possible.

To format column into datatime you have to set HtmlEncode="False" property of BoundField.


The Reason behind for this is bydefault data is Html Encoded that prevents to format date.So, set HtmlEncode to False.



This post first appeared on Asp.Net Tips & Tricks, please read the originial post: here

Share the post

DateTime Formatting in GridView,DetailView,FormView

×

Subscribe to Asp.net Tips & Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×