Sounds like you have something wrong with the class declaration for the code behind in the user control.
Did you add the using CMS.PortalEngine; to the top declaration? and inherit from one of these classes?:
CMSAbstractDataFilterControl
CMSAbstractMenuFilterControl
CMSAbstractQueryFilterControl
Check out this article here: https://docs.kentico.com/display/K8/Developing+custom+filters
If you are using an earlier version than 8 then you might need to inherit from the CMSAbstractBaseFilterControl class.