loading using controls into placeholders

  • Thread starter Thread starter buran
  • Start date Start date
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
 
Have you try

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

Brun
 
Back
Top