"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Saturday, April 24, 2010

Display an Image when the GridView has no data

 you must be already be familiar with the GridView’s EmptyDataText property which displays a message to the user when there are no results returned from the GridView control’s data source.

Now instead of a text message, if you need to display an image or any HTML/ASP.NET control, you can use the EmptyDataTemplate. In this snippet below, we are using the image control in the to display an image.









No comments: