开发者

Master page property access from Content page

开发者 https://www.devze.com 2022-12-18 21:36 出处:网络
FROM BOOK: To reference public properties in a master page, we add the @MasterType declaration to the content 开发者_Go百科page and reference the property using Master.<PropertyName>.

FROM BOOK:

To reference public properties in a master page, we add the @MasterType declaration to the content 开发者_Go百科page and reference the property using Master.<PropertyName>.

QUESTION: But what happens internally? Does all of the master's and content page's properties, function gets complied into one class? Or something else?


The page class has a reference (property) to the master page class. When a page is requested asp.net instantiate a object from your page class and set the master page property to a instance of the master page.

0

精彩评论

暂无评论...
验证码 换一张
取 消