CompositeControl design time GUI creation
I don't know if this is a right question, but i need to understand how it works.
I want to create CompositeControl with design time开发者_运维问答 support, the GUI of the design time support is rendered CreateChildControls().
My question is: When i drop this control on aspx page, what is actually happening in the background for gui to appear on design view?
Does it executes CreateChildControls()? Is it possible to debug the gui creation process?The CreateChildControls will be called in design surface. You can debug your control simply.
- Set your control's class library as a start up project.
- Open the class library's properties panel.
- Hit the Debug tab.
- Select the Start external program and browse your visual studio location.
%VSPath%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
- Put a break point on the CreateChildControls.
- And press F5.
- Create a new web project and Add your control to the Toolbox.
- And Drop it onto the page.
- Break point will be called.
精彩评论