B
Ben Mann
Hi there,
I am starting on an ASP .Net project. I have some examples of using a base
class for pages to inherit from to allow additional properties to be used by
default. This seems like a good idea to me.
I have a namespace Company.Web. I have created a PageBase.vb file with a
PageBase class containing the the properties required. This class also
inherits the System.Web.UI.Page class.
Ive compiled my project then tried to create a new aspx page. The page is
within the same namespace and i have changed the Inherits System.Web.UI.Page
to being Inherits Company.Web.PageBase
But Visual Studio will not allow me to open the page in the Designer View.
The error is
---
The file could not be loaded into the Web Forms designer. please correct the
following error and then try loading it again:
The designer could not be shown for this file because none of the classes
within it can be displayed. The designer inspected the following classes in
the file:
Index --- The base class 'Company.Web.PageBase' could not be loaded. Ensure
the assembly has been referenced or built if it is part of the project.
Make sure all of the classes used in the page are built or referenced in the
project.
---
I have looked at the help and checked the CodeBehind and Inherits setting in
the aspx page itself and it looks fine to me.
If anyone can help, that would be great.
Many Thanks.
Ben Mann.
I am starting on an ASP .Net project. I have some examples of using a base
class for pages to inherit from to allow additional properties to be used by
default. This seems like a good idea to me.
I have a namespace Company.Web. I have created a PageBase.vb file with a
PageBase class containing the the properties required. This class also
inherits the System.Web.UI.Page class.
Ive compiled my project then tried to create a new aspx page. The page is
within the same namespace and i have changed the Inherits System.Web.UI.Page
to being Inherits Company.Web.PageBase
But Visual Studio will not allow me to open the page in the Designer View.
The error is
---
The file could not be loaded into the Web Forms designer. please correct the
following error and then try loading it again:
The designer could not be shown for this file because none of the classes
within it can be displayed. The designer inspected the following classes in
the file:
Index --- The base class 'Company.Web.PageBase' could not be loaded. Ensure
the assembly has been referenced or built if it is part of the project.
Make sure all of the classes used in the page are built or referenced in the
project.
---
I have looked at the help and checked the CodeBehind and Inherits setting in
the aspx page itself and it looks fine to me.
If anyone can help, that would be great.
Many Thanks.
Ben Mann.