Rendering bytes from sql server to an image control?

后端 未结 4 715
天涯浪人
天涯浪人 2020-12-22 04:20

Markup:


    
        
4条回答
  •  星月不相逢
    2020-12-22 05:14

    Cool question. I would write a class implementing IHttpHandler which responds to requests for the image file(s).

    See my answer in the following question for an example of how to get file streams in and out of a SQL varbinary(max) field.

    How to make a fileupload interface in ASP.NET

    Don't forget to use the correct MIME type when crafting the HTTP response.

提交回复
热议问题