Html code:
<asp:GridView ID="gvPictureLibrary" AutoGenerateColumns ="False"
runat="server" EnableModelValidation="True">
</asp:GridView>
Code-behind:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
SPWeb site = SPContext.Current.Web;
SPList list = site.Lists["PL"];
DataTable dt = new DataTable();
dt.Columns.Add("ImageUrl", typeof(string));
DataRow dr;
foreach (SPListItem item in list.Items)
dr = dt.Rows.Add ();
dr["ImageUrl"] = item["ows_EncodedAbsThumbnailUrl"].ToString();
}
ImageField colImage = new ImageField();
colImage.DataImageUrlField = "ImageUrl";
colImage.HeaderText = "Image";
gvPictureLibrary.Columns.Add(colImage);
gvPictureLibrary.DataSource = dt;
gvPictureLibrary.DataBind();