Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
.NET Framework GroupsView
.NET Distributed_Apps
.NET
.NET ADO.NET
.NET ASP.NET
.NET ASP.NET Security
.NET ASP.NET Webcontrols
.NET ASP.NET Web Services
.NET Clr
.NET Compact Framework
.NET Drawing
.NET Interop
.NET Performance
.NET Web Services
.NET Windows Forms
.NET Windows Forms Controls
.NET General
.NET Csharp
.NET Visual Basic
.NET Vc
.NET Security
.NET Xml
Vsnet Debugging
Xml
Xsl
Scripting Jscript
Scripting Visual Basicscript
Scripting Wsh
Smartphone Developer
Visual Basic Com
Visual Basic Controls
Visual Basic Crystal
Visual Basic Database Ado
Visual Basic Syntax
Visual Basic Winapi
Vc Atl
Vc Debugger
Vc Language
Vc Mfc
Vc Stl
Visio Developer Visual Basica
Windowsce Embedded Vc
Windows Powershell
Visual Basic Vista Compatibility
Deployment Server
.NET Micro Porting

Group SummariesView
.NET Framework
Access
BizTalk
Certifications
CRM
DDK
Exchange Server
FoxPro
French
French .NET
Games
German
German .NET
Graphic Design
IIS
Internet
ISA Server
Italian
Italian .NET
Maps
MCIS
Miscellaneous
Mobile Apps
Money
MSN
Networking
Office
Ops Mgr
Publisher
Security
SharePoint
Small Business
Spanish
Spanish .NET
SQL Server
Systems Management Server
Transaction Server
Virtual PC / Virtual Server
Visual Studio
Win32
Windows 2000
Windows 2003 Server
Windows 7
Windows Live
Windows Media
Windows Update
Windows Vista
Windows XP
 

View All Microsoft NET ASP NET Posts  Ask A New Question 

pageBaseType attribute in pages element

Martin Kulov [MVP] posted on Wednesday, March 26, 2008 10:33 PM

Hi,

I am using the pageBaseType attribute in web.config to define a common base
class for all my pages:

However, when I run the site I do not get an error or any notification that
my pages now inherit from BasePage.

In general I can not see any effect of applying it. Any ideas how can I get
the pageBaseType attribute to work for me.



Thanks,

Martin Kulov

www.kulov.net
reply

 

pageBaseType attribute in pages element

jialg posted on Thursday, March 27, 2008 12:55 AM

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 (jialge@online.microsoft.com, 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:
msdnmg@microsoft.com.

==================================================
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.
reply

pageBaseType attribute in pages element

Martin Kulov [MVP] posted on Thursday, March 27, 2008 5:14 AM

Thanks Jialiang!
It would be nice to have the pageBaseType setting in web.config to validate
and force usage of this base class for all pages in the web site. At least
that was the idea in the old usage as I remember.
Can you please reconsider?

Thanks,
Martin Kulov
www.kulov.net
reply

Hello Martin,Yes, I agree that it would be very helpful if we can define a

jialg posted on Thursday, March 27, 2008 6:32 AM

Hello Martin,

Yes, I agree that it would be very helpful if we can define a custom base
page class for all pages in a config entry of web.config. (The pagebaseType
attribute in web.config ONLY applies to pages without a codebehind). But
unfortunately, I am not in ASP.NET development team. I don't think
Microsoft allows me to decide it :-(    It is my pleasure to help send a
wish to our product designers via internal channel. You are also welcome to
add your supplements to make Microsoft products easier and more powerful to
use by submitting a ticket in https://connect.microsoft.com/VisualStudio.
As we strive to capture any and all product feedback so as to ensure that
we are continuously developing Microsoft products to meet customer needs,
feedback such as yours is always taken very seriously. It is appreciated
that you can paste the suggestion's link here after you submit the ticket
in https://connect.microsoft.com/VisualStudio, so that other community
members can benefit from it.

Regards,
Jialiang Ge  (jialge@online.microsoft.com, 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:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
reply

Hello Martin,I have sent your wish to the ASP.NET group.

jialg posted on Monday, March 31, 2008 7:22 AM

Hello Martin,

I have sent your wish to the ASP.NET group. Is there anything else I can do
for you? If you need further assistance, feel free to let me know.

Have a great day!

Regards,
Jialiang Ge  (jialge@online.microsoft.com, 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:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
reply

pageBaseType attribute in pages element

Martin Kulov [MVP] posted on Tuesday, April 01, 2008 12:53 PM

Thanks a lot, Jialiang!

Martin Kulov
www.kulov.net
reply


Previous Microsoft NET ASP NET conversation.