I want to create a helper method that could be called from different code-behind files. This method would return a UserControl (myUC). However I do not see any way of accessing myUC except by Registering the UserControl in the ASPX file or in the web.config file, but neither of these methods will give me access in Non-Code-Behind CS files. I thought that maybe I could wrap the UserControl in a Namespace and then use that namespace in the CS file but that did not work either.
I am thinking of giving up on using the UserControl for a composite control ( http://msdn.microsoft.com/en-us/library/aa719734(v=vs.71).aspx ) as this can be wrapped in a Namespace and used in any CS file.
But before I do this I was wondering if anyone can shed more light on this?
Thank you. Joseph