protected void dlimgrep_ItemCommand(object source, DataListCommandEventArgs e)
{
SqlConnection conn = new SqlConnection(c.connStr);
conn.Open();
if (e.CommandName == "imgshowfull")
{
ModalPopupExtender3.show()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Image img = e.Item.FindControl("imgfull") as Image;
int tlid = Convert.ToInt32(e.CommandArgument);
SqlCommand cmdimgfull = new SqlCommand( tbl_timelinephotos where timelinephoto_id = '" + tlid + "'", conn);
SqlDataReader DRimg = cmdimgfull.ExecuteReader();
if (DRimg.Read())
{
byte[] bytes = (byte[])(DRimg["timeline_photos"]);
base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
img.ImageUrl = "data:image/png;base64," + base64String;
}
DRimg.Close();
}
}