help with user controls

g_r_a_robinson

Regular
Joined
Jan 13, 2004
Messages
71
Hi

I have a usercontrol on my page that contains checkboxes that when clicked will cause another user control to appear. This user control however needs to appear with some modifications. I need to somehow override it to do the following.

The user control that I need to override contains a listbox full of users. When a user in the listbox is clicked all of his/her details are loaded into textboxs. What I need to do is override this control so that it automatically finds the user as already located in the first user control. Now I am extremely new to this and the way I've been doing it is bad and not working very well.

I read an article before on using event handlers and delgates that kind of addressed these issues. Does anyone know of any good links, tutorials or articles on users controls interacting with one another?

Thanks
 
Make a public Property in the second user control. From the first usercontrol, set that Property to the UserID or whatever you need. Then in the second user control's page load sub, populate your data based on the Property that was set.
 
I tried this and it didnt work because my aspx page is being fired before my usercontrol and therefore i don't get the value from the property the first time round.
 
Back
Top