Monday, December 28, 2009

Load Images from binary stream in DataBase

So you have your images in a database, recorded in Binary fields.

To render them in .aspx forms, you need to call so all you're page will show only the image.

To fix this, you can create a gridview that uses a backup form as column (GetImage.aspx).

Download GetImage.aspx
Download GetImage.aspx.cs

In your main form, your gridview should contain a column to get the images for a specific item id:

  <asp:imagefield HeaderText="" dataimageurlfield="Id"
    <ControlStyle Width="400px" />


No comments:

Post a Comment