Inherit from abstract user control breaks designer view

Discussion in 'ASP .Net Web Controls' started by David Crandall, Oct 21, 2003.

  1. 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?
     
    David Crandall, Oct 21, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DesignerX
    Replies:
    0
    Views:
    357
    DesignerX
    Aug 7, 2003
  2. DaKoadMunky
    Replies:
    4
    Views:
    552
    Lee Weiner
    Apr 20, 2004
  3. Matthias Kaeppler
    Replies:
    1
    Views:
    442
    R.F. Pels
    May 22, 2005
  4. Ken Fine
    Replies:
    8
    Views:
    1,377
    Walter Wang [MSFT]
    Aug 29, 2007
  5. Parthiv Joshi
    Replies:
    1
    Views:
    692
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page