I have used the code above (from plsc_rover) to achieve dependency injection with unity and an ObjectDataSource. However, it does not work if the ObjectDataSource is inside a UserControl.
Is there a way to use Unity + ObjectDataSource + UserControl ?
I imagine I could probably set the property/dependency of my UserControl in the containing page by doing something like the following:
protected void Page_Load(object
sender, EventArgs e)
MyUserControl.service = service;
but i would like to avoid this if possible. Can anyone suggest a way to implement a more elegant solution using UserControls and Unity?