ASPX Code
<%@ Page language="c#" MasterPageFile="~/SampleCode/SamplesMasterPage.master" Inherits="SmartWebControls.SampleCode.OrgChartwithBackground" CodeFile="OrgChartwithBackground.aspx.cs" %>
<%@ Register TagPrefix="swc" Namespace="SmartWebControls" Assembly="SmartWebControls.SmartChart" %>
<asp:Content ID="content" runat="server" ContentPlaceHolderID="cphMain">
<div id="divTitle">Displaying an OrgChart with a Background Image using SmartChartLite</div>
<swc:SmartChartLite id="WebSmartChart1" runat="server" Width="717px"
Height="475px" DrawShadows="True"
BackgroundImage="~/SampleCode/SmartChartPro/images/seal.jpg"
DataTitleFields="name,title,duties" DataNodeName="person"
DataKeyField="id" ShadowColor="Gray" DataFields="name,title" BoxColor="Maroon" BoxTextColor="White"
ChartDepth="5" SmartChartDirectory="~/ImageFolder" AllowDrillDown="True" FontStyle="Bold"
ShadowOffset="5" title="Agency Organization Chart" TitleColor="MidnightBlue"
ImageHeight="50" ImageWidth="50" OutputType="Image" BackColor="White"
BorderColor="Black" BorderWidth="1px"
BoxBorderWidth="1px" LineColor="Black" BoxGradient="false"
FixedBoxHeight="" FixedBoxWidth="" ImageType="Png"
RoundBoxEdgesAmount="0" DataSourceID="XmlDataSource1"
HasChildrenImagePath="" HasParentImagePath="" ImageField="" XPath=""
/>
<asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/SampleCode/SmartChartLite/XML/OrgChart.xml"></asp:XmlDataSource>
</asp:Content>
C# Code:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using SmartWebControls;
namespace SmartWebControls.SampleCode
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public partial class OrgChartwithBackground : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e) {
}
}
}