Code behind class

G

Guest

Hi all;

I am using code behind class with each aspx page; can i use multiple code
behind class with a single aspx page. dont consider user controls.
 
B

bhawin13

Hello Mahesh
I think that you can not use multiple code behind class.
Because as far as c# and vb.net is concern it supports only single
inheritance not multiple inheritance. Try to understand what is code
behind it is compiled class reside in application's assembly. your aspx
page will be inherated from that code behind class. so actully your
aspx class will run when you fire any page and it is dynamiclly
compiled.
Please refer code behind model. I think this will solve your problem.

regards,
bhawin13
 
J

Joe Fallon

If you create an inheritance chain you can use multiple code pages.
e.g.

1.
Public Class myPageFrameworkBaseClass
Inherits System.Web.UI.Page

2.
Public Class myDataFrameworkClass
Inherits myPageFrameworkBaseClass

3.
Public Class myRealCodeBehindPage
Inherits myDataFrameworkClass
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top