Hello Martin,
From your post, my understanding on this issue is: you wonder how to define
a common base class with configurations e.g. pageBaseType. If I'm off base,
please feel free to let me know.
In fact, the pagebaseType attribute in web.config ONLY applies to pages
without a codebehind, as per v1.x. For example, if we remove the CodeFile
and Inherits attributes of <%@ Page %>: from the aspx files, and specify
pagebaseType attribute to a self-defined class that inherits from
System.Web.UI.Page, this base page class will be applied to the aspx in run
time successfully.
For more details, please refer to the product feedback "Wrong Code behind
when setting pageBaseType"
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedba
ckID=104608
As this link indicates, we can use a new attribute called codeFilebaseClass
to the page directive in aspx. After the page is created, that will help to
go against some base class that your codeFile also inherits from. However,
the designer will still have generated a codeFile class that extends
System.Web.UI.Page. There is no config entry for codeFilebaseClass. So we
need to manually update codebehind's base class, so that the class defined
in the code file matches the 'inherits' attribute and that it extends the
correct base class (e.g. the class specified in codeFilebaseClass
attribute).
If you have any other concerns or questions, please feel free to let me
know. You are also welcome to add follow-up comments in that feedback link.
Regards,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.