W
Wayne M J
WUC: PageHeader
Prop: Heading (Get/Set)
I have dragged and dropped an instance of the WUC onto the webform, and have
referenced it:
Protected PageHeader1 as PageHeader
If I do a `Return PageHeader1.Heading` I successfully get the current
heading in this case I get a string of nothing per-se.
However, if I attempt `PageHeader1.Heading = "Some Text"`, Debug shows it
goes through the motions, the ASP:Label is shown to have received the text
"Some Text", but once the page is fully loaded, I am greeted with a blank
ASP:Label.
I have tried another approach to this problem, by:
Private Sub Page_Load (...)
Dim MyHeader as Control
MyHeader = LoadControl("PageHeader.ascx")
Page.Controls.AddAt(0, MyHeader)
Response.Write ("--[" & Ctype(MyHeader, PageHeader).Heading & "]--")
'Shows: --[]--
Ctype(MyHeader, PageHeader).Heading = "Some text"
' Actually Shows "Some Text" in the label
End Sub
Isn't that piece of code just the long winded version of the above.
Is this a bug, if so is it my code or theirs (MS) or is this by design?
Prop: Heading (Get/Set)
I have dragged and dropped an instance of the WUC onto the webform, and have
referenced it:
Protected PageHeader1 as PageHeader
If I do a `Return PageHeader1.Heading` I successfully get the current
heading in this case I get a string of nothing per-se.
However, if I attempt `PageHeader1.Heading = "Some Text"`, Debug shows it
goes through the motions, the ASP:Label is shown to have received the text
"Some Text", but once the page is fully loaded, I am greeted with a blank
ASP:Label.
I have tried another approach to this problem, by:
Private Sub Page_Load (...)
Dim MyHeader as Control
MyHeader = LoadControl("PageHeader.ascx")
Page.Controls.AddAt(0, MyHeader)
Response.Write ("--[" & Ctype(MyHeader, PageHeader).Heading & "]--")
'Shows: --[]--
Ctype(MyHeader, PageHeader).Heading = "Some text"
' Actually Shows "Some Text" in the label
End Sub
Isn't that piece of code just the long winded version of the above.
Is this a bug, if so is it my code or theirs (MS) or is this by design?