Refresh UserControl control value based another UserControl in ASP.Net

Last Reply 4 months ago By dharmendr

Posted 4 months ago

This is my situation: I have got a web form, myForm1.aspx, which contains a whole bunch of stuff including 2 user controls, let's call them uc1.ascx and uc2.ascx. 

In uc2.ascx I am performing some action which need to reflected in uc1.ascx by passing thru a parameter which is going to be used to refresh its contents. 

Any idea ? 

Posted 4 months ago

I think I got it. I wrote this in uc2 and it actually appears to work

Dim txt As uc1 = CType(Me.Parent.FindControl("uc11"), uc1)
txt.TextBoxTxt = "Text"