Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Mar 18, 2008 08:30 AM|LINK
I've made sure that the class <T> is the view class by writing out the full namespace :(
PK, are you sure? It's not a matter of namespace. Do you understand the difference between the code-behind class and the ASCX class that doesn't even exist until in-server compilation?
If you write RenderUserControl<My.Project.Namespace.MyViewUserControl>(null, null), it's just going to render a blank, because the code-behind class probably doesn't contain any instructions to render anything.
The only way to make it work is to reference the ASCX class which has a horrible name like RenderUserControl<ASP.views_home_myviewusercontrol_ascx>(null, null).
I'd suggest the RenderUserControl<T> overload should be removed, because this is just going to cause no end of confusion. I can't think of any way it could be easier to use, given that you can have multiple ASCX files "inheriting" the same code-behind class.