如何在Asp.Net上显示Div、Span、Label等位图图像?不要使用处理程序
我想在 Div 中显示位图图像。我想从代码后面做。我不想使用处理程序。
像这样:
div.InnerHtml = BitmapImage;
I want to show been bitmap image in Div. I want to do from code behind. I want not to use handler.
Like This:
div.InnerHtml = BitmapImage;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
非常简单的方法(请注意,您将发送大量数据):
将图像从位图转换为 JPG
获取图像的 base64(base64 图像的示例位于 http://jsfiddle.net/3sdGJ/)
通过写入添加图像:
首选方法是保存图像作为服务器上的 JPG,然后
Pretty simple road to follow (note that you'll be sending a lot of data) :
Convert the image from bitmap to JPG
Get the base64 for the image (example of base64 image at http://jsfiddle.net/3sdGJ/)
Add the image by writing:
The preferred way would be to save the image as JPG on the server and then