Inherit from abstract user control breaks designer view

Inherit from abstract user control breaks designer view

Post by RGF2aWQgQ3 » Thu, 23 Oct 2003 02:11:04


Hey,

I've created an abstract class that inherits from System.Web.UI.UserControl. When I create an implementation of this class I can no longer use the Design View in Visual Studio.Net. For Example

//Abstract base class
public abstract class ReportPanel : System.Web.UI.UserControl
{
public abstract void DisplayReport();
}

//Implementation code class
public UsageReport : ReportPanel
{
public void DisplayReport(){
//Implementation of required method
}
}

//ascx file @Control directive
<%@ Control language="c#" Codebehind="UsageReport.ascx.cs" AutoEventWireup="false" Inherits="UsageReport" %>

If I try to go to the design view of the ascx file in VS.Net I get the following error:

The file could not be loaded into the web forms designer. Please correct the following error and then try loading it again:

Type Abstract

Make sure all of the classes used in the page are built or referenced in the project....

The page runs without error but I can no longer use the Design View.

Any suggestions?
 
 
 

1. How can i use the designer view from a inherit Control?

2. valid views built in view designer can't be opened by view designer

When building remote views, I've noticed that I can build queries with the
View Designer on back ends that have non-Fox features, like spaces in the
field names. The View Designer works fine, the query works fine.

But if I try to reopen the view with the View Designer, I get "syntax error"
messages, so if I want to modify the view, I have to do it programmatically.

The View Designer in VFP9 is very good, and a big improvement over VFP8's
(which was a big improvement over VFP7's). But it really should be able to
open views that it itself created, don't you think?

3. ASP.NET 2.0 User Controls Viewed in the Designer...

4. How to hide/remove an inherited control using the Designer?

5. inherited form problem: designer won't paint controls

6. Designer Error when Inheriting from a Custom Base Control

7. Designer writing code for controls inherited from base Form?

8. Inheriting ListItem controls not supported in Designer?

9. Can't drop inherited control on Form/UserControl designer

10. How do I get an inherited control to show up in the Designer T

11. VS2003: Designing Inherited control in Designer

12. User Controls Inherited from a Custom Control share variables?

13. Collection items disappear from designer on inherited control

14. Inherit from window control vs. User Control

15. Inherited Control And Forms Designer