can I use inheritance in a web form codebehind?

B

bill

I'm using VS 2005 vb.net.

Can I have a web form with a codebehind partial class which inherits from
another codebehind partial class? What is the trick? I can't figure it
out.

-Bill

Like this:
--web form code behind
Partial Class BaseWebForm
Inherits System.Web.UI.Page

Public Overridable sub RunCode
'code
End Sub

End Class

--in a separate web form
Partial Class InheritedWebForm
Inherits BaseWebForm

Sub RunInheritedCode
RunCode
End Sub
--code
End Class
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top