Last post Mar 16, 2008 05:16 AM by joteke
Mar 16, 2008 03:04 AM|sarmiena|LINK
I am creating the following:
1 user control (UC) -- contains a label (Label1)
1 custom control (CC) -- will inherit from button control & contains a pointer to UC
1 aspx page (this will contain 1 CC and 1 UC)
it is the job of the CC to alter the user control in the following manner:
1) CC is clicked
2) CC's OnClick event changes value of UC's Label1
3) The aspx page displays the new value of UC's Label1
The problem is, I do not know how to send UC as a parameter to CC. You can do it with regular controls, but ddon't know how with User Controls. Here is an example of what I want to do:
//But can't understand how to do it for the User Control....
How do i do this???
Mar 16, 2008 05:16 AM|joteke|LINK
is this a web app project in Vs2005/2008 or just standard web site project? And not in separate class library? With web site project User controls are built after class files - this is relevant - if you have these all in the same web site project. If the
custom control is in separate project, it's still valid as the project would need to have reference to the type containing the UC. So basically it's about referencing the type containing the UC.