W
wildman
RE: Accessing MasterPage Properties from a usercontrol on a
contentpage??
On my master page's codebehind I have this property:
Public Property ErrorMsg() As String
Get
Return ErrorLabel.Text
End Get
Set(ByVal value As String)
ErrorLabel.Text = value
End Set
End Property
I've got this on the contentpage,
<%@ MasterType VirtualPath="ShapeUp.master" %>
and I confirmed I can can set the property from the content page.
However on my content page, I have a user control
From inside that user control, I can see all the other properties from
Page.Master , but not ErrorMsg I created on the master page
codebehind.
Also, I've tried this, but it does not work
Dim errorMsg As Label = CType(Page.Master.FindControl("ErrorMsg"),
Label)
errorMsg.Text = "xxxx"
Do I have no choice but to code event handling?
Thanks for any help or information.
contentpage??
On my master page's codebehind I have this property:
Public Property ErrorMsg() As String
Get
Return ErrorLabel.Text
End Get
Set(ByVal value As String)
ErrorLabel.Text = value
End Set
End Property
I've got this on the contentpage,
<%@ MasterType VirtualPath="ShapeUp.master" %>
and I confirmed I can can set the property from the content page.
However on my content page, I have a user control
From inside that user control, I can see all the other properties from
Page.Master , but not ErrorMsg I created on the master page
codebehind.
Also, I've tried this, but it does not work
Dim errorMsg As Label = CType(Page.Master.FindControl("ErrorMsg"),
Label)
errorMsg.Text = "xxxx"
Do I have no choice but to code event handling?
Thanks for any help or information.