Using system; using system.web.ui; using system.Web.ui.webcontrols; using system.ComponentModel; use system.collections.specialize;
Namespace Wcl.MobileBox {///
Public Class MobileBoxDesigner: system.Web.ui.design.controlDesigner {public override string getdesigntimehtml () {MobileBox M_MobileBox = (MobileBox) Component;
TEXTBOX M_TEXTBOX = New TextBox (); StringWriter SW = New StringWriter (); HTMLTextWriter TW = New HTMLTextWriter (SW); M_TextBox.renderControl (TW); return sw.toString ();
}}}
Some questions: TextBox m_TextBox = new TextBox (); StringWriter sw = new StringWriter (); HtmlTextWriter tw = new HtmlTextWriter (sw); m_TextBox.RenderControl (tw); return sw.ToString (); modified StringWriter sw = new StringWriter ( HTMLTextWriter TW = New HTMLTextWriter (SW); M_MobileBox.renderControl (TW); return sw.toString (); not correct why Designer ("Wcl.MobileBox.MobileBoxDesigner), must be absolutely referenced?