I am having an aspx page(example.aspx) with text box control(txtid) and on the same page i am creating a user control(access.ascx) with an image button(click.png). i have to retrieve the text box(txtid) into the user control. how can i retrieve the value of text box control(txtid) in to the usercontrol page(access.ascx)?
try something like:
TextBox txt= (TextBox)this.Parent.FindControl("txtid");
that would go in your usercontrol. this.Parent should get you a reference to the example.aspx page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With