I have a UserControl (lets say Foo.ascx) that has a Type public property with the name Bar. I am looking for a way that when i declare this usercontrol in the source view of the markup part to pass a type. for example
<%@ Register Src="~/Controls/Foo.ascx" TagPrefix="prfx" TagName="fooCtrl" %>
and then use it as
<prfx:fooCtrl ID="theId" runat="server" />
if for example i wanted to pass to the control the type of string (such as typeof(string)) something that would have this effect
<prfx:fooCtrl ID="theId" runat="server" Bar="typeof(string)" />
how can it be done? Before anyone asks, the reason is that i have many other properties in this usercontrol that i pass in this manner and i want to avoid using the CodeBehind just to pass the Type