且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从.net中的SQL Server数据库中检索图像

更新时间:2023-02-08 16:38:45

你有没有尝试 Google? [ ^ ]


不要将图像存储在数据库中,因为它需要大量的流文件到二进制转换,具体取决于图像的大小文件和检索也需要很长时间,因此将图像存储在Web服务器文件系统中,并将每个图像的路径存储在数据库中,以便于检索
dont store images in database because it requires lots of stream file to binary conversion depending on size of the image file and retrieving also takes lot of time,so store images in web server file system and store path of each image in database so its easy to retrieve


<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("image") %>' Height="173px" Width="167px" %>'/>