I have a project in which I have several custom properties and static methods available for a WebPage base class of the form Razor ... i.e. I have...
<system.web.webPages.razor>
<pages pageBaseType="myNamespace.WebView">
</pages>
</system.web.webPages.razor>
in my web.config. fine. However, my helper files use the existing base class ...
In this case, if I want to access some of these methods / properties / etc., I have to call the object CurrentPage, apply it to my custom object of the base class, and then get the methods I need. To make markup in helpers easier and cleaner, I would just like to define some static properties in order to capture the relevant data ...
I did a great job with some static methods and properties inside the block @functions{}, but I would like to redefine the base class that provides the property CurrentPage, so that it is accessible by default in all my auxiliary files, and I don’t have to repeat the code ...
It seems that HelperPage implements WebPageRenderingBase...
looking at the MSDN document for the configuration of RazorPagesSection , it doesn't look like there is anywhere else to change it ...
is there a similar configuration that I can define to override the base HelperPage type ??? that would be very helpful. thank.
source
share