I
ivanpais
Hi,
I have a Web User Control, Lets say "Foo.ascx", that contains a button
"btnFoo".
I have a Master Page "Bar.master", that has a label "lblBar". This
label is exposed by a public property BarLabelText.
I now have a contentpage "FooBar.aspx", where "Bar.master" is the
master page and in the content section has the control "Foo.ascx".
When the button "btnFoo" is clicked, I want to check if the master page
for the Page.Master is "Bar.master" and then set the value of the label
"lblBar".
The user control can see the Page.Master using the this.Page.Master.
However it does not seem to be able to identify the Master page class
and cannot access the master page's BarLabelText property.
Can anyone shed some insight? How can I access the Master Page's public
properties/methods from a web user control on the page?
Thanks in advance.
Ivan.
I have a Web User Control, Lets say "Foo.ascx", that contains a button
"btnFoo".
I have a Master Page "Bar.master", that has a label "lblBar". This
label is exposed by a public property BarLabelText.
I now have a contentpage "FooBar.aspx", where "Bar.master" is the
master page and in the content section has the control "Foo.ascx".
When the button "btnFoo" is clicked, I want to check if the master page
for the Page.Master is "Bar.master" and then set the value of the label
"lblBar".
The user control can see the Page.Master using the this.Page.Master.
However it does not seem to be able to identify the Master page class
and cannot access the master page's BarLabelText property.
Can anyone shed some insight? How can I access the Master Page's public
properties/methods from a web user control on the page?
Thanks in advance.
Ivan.