I have a UserControl which uses a UserControl, among other controls.
In the ascx file I have the following code:
ascx
<%@ Register TagPrefix=
Please try to put code in Page_prerender event of page. It will work for you.