Thursday, March 29, 2012

Seperate folder page Inheritance issue

Hi,
I have a page "Project Folder\Customers\Products.aspx" which I want to inherit from another page "Project Folder\Product.aspx". As mentioned both files are in seperate folder.
In the customer specific Product.aspx page I want to use some code of the main product page. How can I do this? How can I inherit from page in a different folder?
Thanks in advance.

(if this is 2005) the code files should be in the app_code folder then. The security model in 2005 makes it difficult to get at the other files.
I don't think you can actually inherit from an other page (aspx). You have to create a custom control (ascx) and put this control in each of your page. If you want to inherit the code, juste create a class which inherits from Page and your pages just need to inherit from this class.
Yes. I am using .net 2.0 and VS 2005. Sorry i didn't mentioned that.
or use master pages...that's what they are there for :}

0 comments:

Post a Comment