S
Sue
aspx:
<form id="Form1" method="post" runat="server">
<asplaceHolder ID="PH" Runat="server"/>
</form>
'-----------------------------------
code behind:
Protected WithEvents PH As PlaceHolder
Protected WithEvents TestLabel As TestLabels = LoadControl("TestLabels.ascx")
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
TestLabel.SetText = "Hello World"
PH.Controls.Add(TestLabel)
End Sub
'-----------------------------
DisplayLabels.ascx:
<asp:Label ID="ThisLabel" Runat="server" />
'----------------------------
code behind:
Protected WithEvents ThisLabel As Label
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
With ThisLabel
.ID = "ThisLabel"
.Text = "None"
End With
End Sub
Public WriteOnly Property SetText() As String
Set(ByVal Value As String)
ThisLabel.Text = Trim(Value)
End Set
End Property
'-------------------------
when compiled and brought up in browser (IE6.x), the result is "None" rather
than "Hello World". Any clue why?
tia,
Sue
<form id="Form1" method="post" runat="server">
<asplaceHolder ID="PH" Runat="server"/>
</form>
'-----------------------------------
code behind:
Protected WithEvents PH As PlaceHolder
Protected WithEvents TestLabel As TestLabels = LoadControl("TestLabels.ascx")
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
TestLabel.SetText = "Hello World"
PH.Controls.Add(TestLabel)
End Sub
'-----------------------------
DisplayLabels.ascx:
<asp:Label ID="ThisLabel" Runat="server" />
'----------------------------
code behind:
Protected WithEvents ThisLabel As Label
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
With ThisLabel
.ID = "ThisLabel"
.Text = "None"
End With
End Sub
Public WriteOnly Property SetText() As String
Set(ByVal Value As String)
ThisLabel.Text = Trim(Value)
End Set
End Property
'-------------------------
when compiled and brought up in browser (IE6.x), the result is "None" rather
than "Hello World". Any clue why?
tia,
Sue