Common Custom controls
Common_CustomControls_VBNet\ADFWebPart\MapGridViewWebPartDesigner.vb
' 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.
' 

Imports Microsoft.VisualBasic
Imports System
Namespace ADFWebPart_VBNet
    ''' <summary>
    ''' Defines the behavior of the control at design time.  
    ''' </summary>
    Public Class MapGridViewWebPartDesigner
        Inherits System.Web.UI.Design.ControlDesigner
        ' Called by the IDE when drawing the control at design time
        Public Overloads Overrides Function GetDesignTimeHtml() As String
            ' Get a reference to the design-time instance
            Dim mapGridViewWebPart As MapGridViewWebPart = TryCast(MyBase.Component, MapGridViewWebPart)

            ' Render the control to an HtmlTextWriter.  RenderControl will fire the control's
            ' RenderContents method.
            Dim stringBuilder As System.Text.StringBuilder = New System.Text.StringBuilder()
            Dim htmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(New System.IO.StringWriter(stringBuilder))
            mapGridViewWebPart.RenderControl(htmlTextWriter)

            ' Return the HTML string
            Return stringBuilder.ToString()
        End Function
    End Class
End Namespace