Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > loading using controls into placeholders

Reply
Thread Tools

loading using controls into placeholders

 
 
buran
Guest
Posts: n/a
 
      04-06-2004
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


 
Reply With Quote
 
 
 
 
Bruno Sirianni
Guest
Posts: n/a
 
      04-06-2004
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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Placeholders or One to load controls tshad ASP .Net 6 08-01-2007 03:54 PM
web user controls and placeholders cyndie woodster via DotNetMonster.com ASP .Net 1 03-02-2005 01:16 PM
Failed to load viewstate when dynamically adding controls in placeholders Sinisa Ruzin ASP .Net 0 10-07-2004 05:31 PM
Passing Parameters to User Controls that are Dynamically Loaded in Placeholders Josh ASP .Net Building Controls 1 05-26-2004 06:41 AM
Passing Parameters to User Controls that are Dynamically Loaded in Placeholders Josh ASP .Net 1 05-26-2004 12:42 AM



Advertisments