I'm new to usercontrols, having only created one so far, so bear with me. I've been reading today that usercontrols are supposed to be self-contained and not rely on any information from the parent container. I get that part, but what I'm having trouble understanding is the "right" way to design my program around that principle.
I'm making a web form in C# in which there's a page with a usercontrol in that page. I've made the usercontrol in its ascx file and dragged it into my aspx page. The usercontrol is a couple date boxes and a gridview to show the results of an SQL stored procedure.
I'd really like to reuse this control, but I can't figure out how to "tell" the usercontrol what stored procedure I'd like to run for the specific page I'm on without violating the "don't rely on the parent container" rule.
Thanks