ASP.NET GridView And Conditional Images

September 14th, 2006 Leave a comment Go to comments

Depending upon a value in the data source, we can conditionally display images in GridView columns. For example, the following TemplateField declaration conditionally displays approved.gif or unapproved.gif based on IsApproved flag in the DataSet that the GridView is bound to:

<asp :Image ID="ApprovalImage" runat="server" ImageUrl="" />

  1. Jef Claes
    September 30th, 2008 at 02:03 | #1

    Thanks!

  2. Anonymous
    December 24th, 2008 at 07:09 | #2

    Thanks a lot Dude
    Helped me a lot

  3. python 2007
    March 24th, 2009 at 00:06 | #3

    great ! really helped me dude

  1. No trackbacks yet.