ASP.NET
  Home arrow ASP.NET arrow Handling Dynamic Images in ASP.NET 3.5 AJA...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Handling Dynamic Images in ASP.NET 3.5 AJAX Applications
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-09-03

    Table of Contents:
  • Handling Dynamic Images in ASP.NET 3.5 AJAX Applications
  • Constructing an ASP.NET AJAX Styled Message Board Sample
  • About the Data Storage
  • Creating the Sample .aspx Page
  • Property Related Value

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Handling Dynamic Images in ASP.NET 3.5 AJAX Applications


    (Page 1 of 5 )

    In the examples in the first part of this series, we discussed ways to make static image data persist in the server side files or databases. Nevertheless, in many other web applications, such as those on finance and economics sites, the images or charts are usually generated on the server side dynamically, and then sent back to the browser side in binary data via the HttpResponse output stream. This article, the conclusion to this two-part series, will show you how.

    GDI+ comes to the rescue

    How can you create and manipulate these kinds of dynamic server side images? Traditionally, most solutions fall back on third party libraries or other applications-provided image engines (such as Microsoft Office). Nowadays, things have changed drastically; GDI+, the next generation of image engine under .NET environments, offers a solution. ASP.NET applications can use GDI+ as the back-end image engine to generate any required static or dynamic images or charts on the fly.

    As you may have realized from reading my previous articles, GDI+ brings forward a fully object-oriented programming model instead of the device context and object handle to greatly simplify the image handling in .NET environments. The most important concept introduced in GDI+ is Graphics, which plays the role of a central controller when rendering. The other important concepts are Image class, Bitmap class, and many other new object models.

    Moreover, it is worth noticing that, to provide images dynamically, you must utilize a custom HTTP handler. The modes for the handler to obtain the image bits should rest on their inner implementation. There are generally three ways to do this: store the image bits in a database, ASP.NET Cache, or generate the image data dynamically.

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek