节点文献
基于ASP.Net的图像动态显示技术
The Technology of Dynamic Image Display Based on ASP.Net
【摘要】 在开发基于B/S构架的Web应用系统过程中,简单地通过<img>标签的src属性指定图像URL来引用图像的方法不能满足日益复杂的动态显示图像的需求。文中通过分析HTTP相关协议,提出了在ASP.Net应用开发中的解决方案:服务端根据客户端的请求参数,动态加载图像信息,同时通过指定MIME头的Content-Type属性,向客户端返回图像的数据流;客户端根据Content-Type属性值解析返回流中的图像数据,实现了动态显示服务器端图像的功能。文中以C#语言给出了关键技术的程序实现。通过验证,该方法是可行的,能方便地在用户提出请求时动态加载图像,将图像流传送到客户端浏览器,使服务器端的图像存取更加灵活,方便了Web服务器端的编程。
【Abstract】 In the development of Web application based on B/S architecture, just using the common method to display an image in Web page can not content with the requirement of dynamic image display. This article introduces the technology of dynamic image display, and by analyzing the protocol of HTTP, it give the solution in ASP.Net: Web server load the image information dynamically according to the request of client, set the right data type, and send the image data stream back to the client. The browser of client explain the data stream according to the data type and display the image. And this technology is proved to be feasible. This makes the storage and fetching of image more flexible and facility the programming of the Web server.
- 【文献出处】 微机发展 ,Microcomputer Development , 编辑部邮箱 ,2004年07期
- 【分类号】TP393.9
- 【被引频次】17
- 【下载频次】209