CreateChildControls problem

  • Thread starter Thread starter popman
  • Start date Start date
P

popman

I develop a class which inherits textbox class.and I override the
CreateChildControls method like code below:
Protected Overrides Sub CreateChildControls()

Controls.Add(New LiteralControl("<b>kkkkkkkkkk</b>"))

End Sub

But it didn't work.What's the problem?

Thanks.
 
When you override a method, you should almost always call the base class
method as well:

Protected Overrides Sub CreateChildControls()
Controls.Add(New LiteralControl("<b>kkkkkkkkkk</b>"))
MyBase.CreateChildControls()
End Sub
 
Back
Top