Hello Friends,

In following function I am reading an image from database, and trying to 
display in my web page.
both the following function are functioning properly, BUT the problem is that 
when i dispaly the image in my 
web page i can not display any other content (like text, other images etc.) of 
the page, 
ONLY the image appear on the page;

PLease tell me the way of displaying the dynamic image with other dynamic 
content on the same page.

Thanks,
Arindam  //Look at the following functions


   
************************************
void ShowImagesFromDB()
  {

  byte []imgBuffer=GetImageFromDB("ImageName_1") ;// look at the function bellow
  MemoryStream objStrm=new MemoryStream();
objStrm.Write(imgBuffer,0,imgBuffer.Length);
  Bitmap objBitMap=new Bitmap(objStrm); 
 Response.ContentType = "image/gif";
objBitMap.Save(Response.OutputStream,ImageFormat.Gif);  
 
  }

 

************************************

 public byte[] GetImageFromDB(string ImageName)
  {
   byte [] buffer=null;

   objDB.OpenConnection();
   SqlCommand objCom=new SqlCommand("Select ImageName from ImageTable where 
ImageName='"+ImageName+"'",objDB.mysqlconn);  
   SqlDataReader objReader=objCom.ExecuteReader(); 
   if (objReader.HasRows)
   {
   objReader.Read();
   buffer = (byte [])objReader["BannerImage"];
   objReader.Close(); 
   }
   return buffer;
  }



Thanks & Regards

Arindam 
Web Designer & Developer  




Yahoo! India Matrimony: Find your life partneronline.

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to