using System; using System.Collections.Generic; using System.Text; using System.Web.UI.Design; namespace OpenFlashChart { public class ChartControlDesigner : ControlDesigner { public override string GetDesignTimeHtml() { string errorDesignTimeHtml; StringBuilder builder = new StringBuilder(); try { OpenFlashChartControl component = (OpenFlashChartControl)base.Component; OpenFlashChartControl chart = component; builder.AppendFormat("
", chart.Width, chart.Height); builder.Append("Open Flash Chart Control"); builder.Append("
"); errorDesignTimeHtml = this.CreatePlaceHolderDesignTimeHtml(builder.ToString()); } catch (Exception e) { errorDesignTimeHtml = this.GetErrorDesignTimeHtml(e); } return errorDesignTimeHtml; } protected override string GetErrorDesignTimeHtml(Exception e) { string instruction = string.Format("Exception:{0}", e.Message ); return this.CreatePlaceHolderDesignTimeHtml(instruction); } } }