2

多くの記事を読んだことがありますが、記事のほとんどは、SQL Server から gridview にイメージをバインドするための httphandler またはハンドラーを提案しています。

httphandler または handler なしでデータベースから gridview に画像をバインドすることは可能ですか? はいの場合は、サンプルコードを提供してください

私のテーブル スキーマ: テーブル名:- ImageGallery

Column Name     DataTypes

Photo           image


 The above table stored the images in <Binary data>
4

2 に答える 2

1
    Instead of storing image as Binary datatype in database, U can try an alternate Solution.


 1. Make the column datatype as varchar or nvarchar.

 2. Store your image in a seperate folder.

 3. Fetch the url for that Image.

 4. Save it in the Database.

 5. Now in your gridview mention tha column data according to ur wish.

 6. During Runtime the URL will refer to the content and the image will
    be displayed in your Gridview.
于 2013-08-06T11:09:47.987 に答える