hi
i have a blob in my sql server database, that i would like to display on my
web page..
i have 2 problems with this.
1). i am able to display it but i cant add any text in the page.
2) also i would like to position the text and the image.
this is the function used to write out the img to the browser.
/// <summary>
/// The ImageID variable holds the ImageID passed from ViewImages </summary>
int ImageId = System.Convert.ToInt32(Request.QueryString["ImageId"]);
/// <summary>
/// imageContent will be used to hold the record returned from the database.
/// This line calls the GetImages function. </summary>
SqlDataReader imageContent = GetImages(ImageId);
/// <summary>
/// The Read method is used to load the record into memory </summary>
imageContent.Read();
/// <summary>
/// The ImageType is retrieved from the database and sent to the browser as
the
/// ContentType. This tells the browser how to display the image. </summary>
Response.ContentType = imageContent["ImageType"].ToString();
/// <summary>
/// The OutputStream.Write is used to write a byte array of the image,
starting at
/// the first byte and proceeding through the entire file. </summary>
Response.OutputStream.Write((byte[])imageContent["ImageFile"], 0,
System.Convert.ToInt32(imageContent["ImageSize"]));
Response.Write ("help");
/// <summary>
/// Call the End method to indicate to the browser that the entire image has
been sent. </summary>
Response.End();
I have taken this code from
http://msdn.microsoft.com/vcsharp/do...s/default.aspx
Read and Write Images to a SQL Server Database with C#
thanx