开发者

how to bind an thumbnail image in repeater control

I have an requirement where in my datatable. I have 3 columns.

serverpath,image name, id

Now I need to get the imagepath 开发者_开发技巧 from that the datatable[serverpath] and bind it in a repeater control or gridview control and show the thumbnail images there. Actaully in the path d:/application/images folder I have images.

When I bind to repeater control or grid control I need to convert the orignal images into thumbnail and display in reater control. In (5x5) rows x columns but I need to show only thumbnail images no other details like[server path,id].

ex:

thumailimge1   thumailimge2 thumailimge3   thumailimge4 thumailimge5   
thumailimge6   thumailimge7 thumailimge8   thumailimge9 thumailimge10

so once the user click on this thumbnail orignal image will be displayed in a new window

hope my question is clear...

how can I achieve this functionality? any help would be greatly appreciated


You could write a custom asp.net handler (or even a plain aspx page where you manually write to the Response) to serve the image as the source for an img tag in your repeater

ASHX:

http://www.codeproject.com/KB/aspnet/CustomImageHandler.aspx

http://dotnetperls.com/ashx-handler

ASPX:

http://weblogs.asp.net/whaggard/archive/2003/03/23/4180.aspx

http://www.devx.com/vb2themax/Tip/19463

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜