Inherit from abstract user control breaks designer view

D

David Crandall

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?
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top