What's the best way to make several page methods available on multiple pages. All the pages that will contain these page methods belong to the开发者_C百科 same master page. Do I put them in the master page or do I create a base page?
Thanks.
A slightly more in-depth description of what the methods do might help, but depending on their purpose you have two options:
Create a base page class and allow the pages to inherit from that class (better option to use if the methods modify the page's internal state).
Create a library of static helper methods (better option if the methods are utility methods that don't modify the internal state of the page).
精彩评论