Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2012, 06:50 AM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question inheritance from a class to webform.

hey all,

I'm writing a die program to activate numerous times on a web form. I want a class mDie to inherit mainDie class on the web form. can someoe show me how to inherit a class on web form please?
 
Old February 24th, 2012, 06:02 AM
Friend of Wrox
 
Join Date: Nov 2009
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Smile

Hi there

each web form is a class itself that inherits System.Web.Page class

public partial class Default : Page{

}


so you can change this default inheritance:

Code:
public class myPage : Page
{
// do something here like:
    public myPage(){ //ctor
       this.Load += load();
    }

    private void load(object sender, EventArgs e){
        // some code here to be executed on Page_Load
    }
}

public partial class Default : myPage
{

}
__________________
happy every time, happy every where

Reza Baiat
 
Old February 26th, 2012, 12:16 PM
Registered User
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the help





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object Class and Multiple inheritance deepthraj BOOK: Professional C#, 2nd and 3rd Editions 1 May 23rd, 2006 12:57 PM
object class and multiple inheritance deepthraj General .NET 5 August 13th, 2005 10:12 AM
Question about Class Inheritance forkhead Pro VB.NET 2002/2003 0 March 21st, 2005 03:37 PM
Newbie question on the 2nd ed: Class inheritance elde BOOK: Professional C#, 2nd and 3rd Editions 0 December 9th, 2004 03:00 AM
base class inheritance krunch97 VB.NET 2002/2003 Basics 6 April 23rd, 2004 11:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.