Populating ImageBox from dataset
-
Hi I've a dataset which retrieves an Image from table. I want to bind it an imagebox. How to do it? Thanks in advance. Irshad
-
Hi I've a dataset which retrieves an Image from table. I want to bind it an imagebox. How to do it? Thanks in advance. Irshad
You can create another apx page and in the page load of this new aspx you can write this. byte[] image = null; image =(byte[])objDV[0]["imgImage1"];// Taking it from dataview/dataset/dtable Response.ContentType = objDV[0]["strImage1ContentType"].ToString(); Response.BinaryWrite(image); Assume this new aspx page name is ImageLoad.aspx In your page where you are taking an Image control, call the method from aspx page. and in code behind you will have protected string GetLogoURL(object objLogo) { return "ImgLoad.aspx" } "Walking on water and developing Software on a specification is easy, if both are frozen..." -- modified at 4:31 Tuesday 19th September, 2006