kaisersoze Posted August 27, 2003 Posted August 27, 2003 How to pass value of a variable from one usercontrol to another usercontrol. for example: I have 2 usercontrols UC1.ascx, UC2.ascx and both ascx are registered and called in one aspx page. UC1 have a public variable (pubVariable1) and a button. UC2 has a public variable (pubVaraible2) and a public function (pubFunction). How to pass value of pubVariable1 to pubVariable2 on a click event of a button in UC1. Note: button and pubVariable are in UC1? Quote Note: I think as a programmer not as a human, so use my answer at your will
rustyd Posted August 27, 2003 Posted August 27, 2003 You could add a public property to each usercontrol. This allows you to see and set the property. You could then say: uc1.pubVariable1 = uc2.pubVariable2 Quote rustyd
kaisersoze Posted August 28, 2003 Author Posted August 28, 2003 I tried but i can see the value is moving in the debug mode but when i run without debug mode the value is still the same. Quote Note: I think as a programmer not as a human, so use my answer at your will
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.