By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,353 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,353 IT Pros & Developers. It's quick & easy.

CreateChildControls problem

P: n/a
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.
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
--
John Saunders
John.Saunders at SurfControl.com
"popman" <ne****@sohu.com> wrote in message
news:O1*************@TK2MSFTNGP12.phx.gbl...
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.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.