Hi there,
Now let's create a small AJAX example using the cool Microsoft ASP.NET AJAX (Formerly "Atlas"), and the not-less-cooler MindFusion NetDiagram.
Start by downloading and installing ASP.NET AJAX from
http://ajax.asp.net/. It is a beta 2 version, and works pretty well.
Next, create a new Web Site project, and choose "ASP.NET AJAX-Enabled Web Site" from the list of templates. Set the project name to "OrgBrowser". This sample will let users browse the hierarchy of a very big organization. So, we don't want to load all of the organization data, but only load a part of it upon request, e.g. when the user clicks the + button to expand a node.
Add the NetDiagram stuff as we did in the previous example. Drag a FlowChart on the web form and call it "fc". When the page loads, create only the root node:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Box root = fc.CreateBox(5, 5, 25, 16);
root.FillColor = Color.White;
root.Text = "Boss";
root.EnabledHandles = Handles.Move;
root.HandlesStyle = HandlesStyle.DashFrame;
root.Expandable = true;
root.Expanded = false;
}
}
Now, if you run the page, you will see a single box on the flowchart canvas.