Aurigma Graphics Mill 5.5 for .NET
Quick Start in ASP.NET AJAX
This topic demonstrates how to get started with ASP.NET AJAX Controls of Aurigma Graphics Mill 5.5 for .NET. It provides step-by-step instructions how to create a simple web application which loads and displays an image.
Prerequisites
In addition to system requirements applied to Graphics Mill for .NET, ASP.NET AJAX Controls require to have ASP.NET 2.0 AJAX Extensions 1.0 to be installed. You can download it from http://go.microsoft.com/fwlink/?LinkID=77296.
Getting Started
-
In Visual Studio 2005 create new ASP.NET AJAX-Enabled Web Site (menu File -> New Web Site...)
-
Add BitmapViewer AJAX control to the toolbox:
- Right-click on the tab of toolbox where you want to add this control and select Choose Items....
- Find the BitmapViewer in the .NET Framework Components tab.
-
If you cannot find this component, click Browse... and find the Aurigma.GraphicsMill.AjaxControls.dll assembly. Then click OK on both Open and Choose Toolbox Items dialogs.
-
Open the necessary page (for example, Default.aspx) in the Design mode, then drag and drop the BitmapViewer control into the desired position.
-
Open the file which contains the code behind of this page (for example, Default.aspx.cs), and add the code which will load the sample image to the Page_Load event handler:
Visual Basic
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then BitmapViewer1.Bitmap.Load(Server.MapPath("cat.jpg")) End If End SubC#
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { BitmapViewer1.Bitmap.Load(Server.MapPath("cat.jpg")); } } -
Run the application (menu Debug -> Start Without Debugging or Ctrl+F5 shortcut). The page with the BitmapViewer control containing the image you specified on the last step will appear.