DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 06 Aug 2007 20:05:36 GMT,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Nirmalkumar
          2    Sergey Poberezovskiy


Page_Init calling sequence in ASP.NET   
i need to create custom base class for my ASP.NET 2.0 web pages.

A : InheritsWeb.UI.Page

B : Inherits A

C : Inherits B

and then all my web pages extends/Inherits custom base class 'C'.

now i need to write page_Init in class 'B' and 'C' .

Please help me how to write page_Init method in the above Scenario.

If you people have any reference code, where custom base class is used in ASP.NET 2.0. let me know

From http://developmentnow.com/g/8_2006_11_0_7_0/dotnet-framework-aspnet.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Date:Mon, 06 Aug 2007 20:05:36 GMT   Author:  

RE: Page_Init calling sequence in ASP.NET   
place all three (A, B & C) in your App_Code folder and modify your web.config 
as follows:

  <system.web>
	...
	<pages pageBaseType="PageC">
	...

this way all your pages will be forced to inherit from C

I did not understand the question/problem about writing Page_Init. If you 
need to control the order of code execution, use OnInit override, otherwise 
just place Page_Init into your classes (assuming that AutoEventWireup is set 
to true) or hook it up in the classes' constructor.

"Nirmalkumar" wrote:


> i need to create custom base class for my ASP.NET 2.0 web pages.
> 
> A : InheritsWeb.UI.Page
> 
> B : Inherits A
> 
> C : Inherits B
> 
> and then all my web pages extends/Inherits custom base class 'C'.
> 
> now i need to write page_Init in class 'B' and 'C' .
> 
> Please help me how to write page_Init method in the above Scenario.
> 
> If you people have any reference code, where custom base class is used in ASP.NET 2.0. let me know
> 
> From http://developmentnow.com/g/8_2006_11_0_7_0/dotnet-framework-aspnet.htm
> 
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
> 
Date:Mon, 6 Aug 2007 15:16:01 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us