Inheritance

H

Hai Nguyen

I would like to know I have two pages: consider page1, page2. Also, I have
code C# behind these two asp.net webforms. I code some methods in page1 and
I want page2 inherit what page1 has.
I know something has to deal with reference and inherit namespace and such.

Please give me a link or keywords to look up

Thanks
 
T

Tu-Thach

In your page2 code, just make it inherits from page1 like
this

public class page2 : page1
{
// Your code...
}

Tu-Thach
 

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

Top