loading using controls into placeholders

B

buran

Dear ASP.NET Programmers,

Please consider the following code. How can I reach the textbox with the ID
txtBurak in the "pe.ascx"?

Private Sub cblMRParts_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cblMRParts.SelectedIndexChanged
Dim myControl As Control
If cblMRParts.Items(0).Selected Then
myControl = Me.LoadControl("pe.ascx")
phPE.Controls.Add(myControl)
End If
If cblMRParts.Items(1).Selected Then
myControl = Me.LoadControl("lab.ascx")
phLab.Controls.Add(myControl)
End If
End Sub

Thank you,

Burak
 
B

Bruno Sirianni

Have you try

myControl = Me.LoadControl("pe.ascx")
phPE.Controls.Add(myControl)
Me.FindControl("txtBurak") ?

Brun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top