Common Custom controls
Common_CustomControls_CSharp\ADFWebPart\MapGridViewWebPartDesigner.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.
// 


namespace ADFWebPart
{
    /// <summary>
    /// Defines the behavior of the control at design time.  
    /// </summary>
    public class MapGridViewWebPartDesigner : System.Web.UI.Design.ControlDesigner
    {
        // Called by the IDE when drawing the control at design time
        public override string GetDesignTimeHtml()
        {
            // Get a reference to the design-time instance
            MapGridViewWebPart mapGridViewWebPart = base.Component as MapGridViewWebPart;
            
            // Render the control to an HtmlTextWriter.  RenderControl will fire the control's
            // RenderContents method.
            System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
            System.Web.UI.HtmlTextWriter htmlTextWriter = 
                new System.Web.UI.HtmlTextWriter(new System.IO.StringWriter(stringBuilder));
            mapGridViewWebPart.RenderControl(htmlTextWriter);           

            // Return the HTML string
            return stringBuilder.ToString();
        }
    }
}