web forms inheritance
-
Hi all, Im trying to do a web application and i have a problem with inheritance. What im trying to do is to have a base class with the top banner, navigation menu and footer in it. All my derive classes will inherit these and add their content to the body of that base class using html render or similar. I havent seen anything like that in any of the articles or forusms. Is it possible? Can i have a web form that i can treat it as a normal web for and then inherit from it? What i mean is a base web form with code behind that i can inherit. Thanks in advance, Kakomalis
-
Hi all, Im trying to do a web application and i have a problem with inheritance. What im trying to do is to have a base class with the top banner, navigation menu and footer in it. All my derive classes will inherit these and add their content to the body of that base class using html render or similar. I havent seen anything like that in any of the articles or forusms. Is it possible? Can i have a web form that i can treat it as a normal web for and then inherit from it? What i mean is a base web form with code behind that i can inherit. Thanks in advance, Kakomalis
You can set up a base class hierarchy for the code behinds, but not for the HTML pages. Your .aspx pages will need to be copied from a template page or use #includes (from Classic ASP) to include the common elements. Creating the inheritance hierarchy doing this sometimes creates issues for the design view in Visual Studio. The end result forces you to modify the pages in code view instead of design view. -BC