Here is the sample code to show in page from database which i used earlier..!
byte[] arrContent = null;
DataTable dt = new DataTable();
DataRow dr = default(DataRow);
int id = Convert.ToInt32(Request.QueryString["id"]);
//string username=Page.User.Identity.Name;
//Getting the Image
dt = PlayerInfo.ImagSelect(username);
dr = dt.Rows[0];
//storing it in array
arrContent = (byte[])dr["photo"];
int length = arrContent.Length;
Response.ContentType = "image/JPEG";
if (length!=0)
Response.OutputStream.Write(arrContent, 0,length);
Response.End();
You can check this link to sample Image Control..!
ships_agr wrote:
i connected the adrotator to sqldatasource through a configure datasource wizard and when i tested the query there in wizard it worked f9...but on running the application no image is displayed in adrotator
It Should be converted to binary format .You can visible the image thr wizard but not in page..!
LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.