I have 2 Controls – ProductInfo and Distribution.
On the Product Info Controls there are these text boxs – txtPrice, txtDate, txtFreq
On the Distribution control, i would like to get the value of above text boxes.
I tried :
BasePage.FindControl("txtPrice")
But it return null.
Please help.
Thanks,
I would create properties in the ProductInfo control to expose the value of txtPrice, like this:
And then in the other user control, try something like this:
Recursive method
You may need to use recursion to find the
ProductInfocontrol, and if you do something like this should work:Using
FindControlRecursive: