asp.net - Testing to see if ContentPlaceHolder content has been overridden by a child page? -
I am currently migrating .NET 1.0 to .NET 3.5.
Pure 1.1 There are several pages in the application + Usurrons that I want to migrate to the masterpage.
My issue is trying to be practically tested to see if the content of the main page has been overridden by the child page or not.
- Is this possible?
- Do anyone have samples or references that I can see?
Thanks in advance
Communicate with a page master page On the contrary, the content on the content placeholder is not related because the master page on the Master page is the fastest way to create a page "registration" on its master page, declaring a class that comes from the .NET Master page and Exposes the communication functionality in that class.
Public Essentials MyMaster: System.Web.UI.MasterPage {Public MyMaster () {}
Public abstract zero TellMeSomethingAboutTheContent (SomeArgs args);
}
Then the master you use in your page can do something like this:
Protected Zero Page_load ( Object sender, event ergues e) {master master = pg. As a master mister; If (master == empty) return; Master.TellMeSomethingAboutTheContent (args); }
Definitely assume that you have some ARG class in which the data is included, which you want to know about the master page.
Comments
Post a Comment