ArcGIS_NAServer_Routing_CSharp\MapImage.aspx.cs
// Copyright 2010 ESRI // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // You may freely redistribute and use this sample code, with or // without modification, provided you include the original copyright // notice and use restrictions. // // See the use restrictions. // using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class MapImage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // Draw the Map image from the Session State System.Drawing.Image mapImage = Session["MapImage"] as System.Drawing.Image; if (mapImage != null) { Response.ContentType = "image/jpeg"; mapImage.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); } } }