loading using controls into placeholders

Discussion in 'ASP .Net' started by buran, Apr 6, 2004.

  1. buran

    buran Guest

    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
     
    buran, Apr 6, 2004
    #1
    1. Advertising

  2. Have you try

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

    Brun

    "buran" <> wrote in message
    news:eRYS1b$...
    > 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
    >
    >
     
    Bruno Sirianni, Apr 6, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Josh
    Replies:
    1
    Views:
    9,555
    Jeffrey Palermo [MCP]
    May 26, 2004
  2. Sinisa Ruzin
    Replies:
    0
    Views:
    865
    Sinisa Ruzin
    Oct 7, 2004
  3. cyndie woodster via DotNetMonster.com

    web user controls and placeholders

    cyndie woodster via DotNetMonster.com, Mar 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    341
    Guest
    Mar 2, 2005
  4. tshad
    Replies:
    6
    Views:
    497
    tshad
    Aug 1, 2007
  5. Josh
    Replies:
    1
    Views:
    204
Loading...

Share This Page