Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6697931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:31:06+00:00 2026-05-26T06:31:06+00:00

I have a custom base page class: //MobileFunnelPage.cs public abstract class MobileFunnelPage : Page

  • 0

I have a custom base page class:

//MobileFunnelPage.cs  
public abstract class MobileFunnelPage : Page  
{  
    public virtual Repeater myRepeater{get;set;}  
}

Then I have a page that inherits that page:

//ConcreteMobileFunnelPage.aspx.cs  
public class ConcreteMobileFunnelPage: MobileFunnelPage  
{  
    protected override void Page_Load(object sender, EventArgs e){  
        myRepeater.DataSource = new string[]{"Error 1","Error 2","Error 3"};  
        myRepeater.DataBind();  
    }  
} 

With the following markup:

//ConcreteMobileFunnelPage.aspx
<%@ Page Title="ConcreteMobilePage!" Language="C#" AutoEventWireup="true" CodeBehind="ConcreteMobileFunnelPage.aspx.cs" inherits="MyNamespace.ConcreteMobileFunnelPage" %>  
...  
<asp:Repeater ID="myRepeater" runat="server" Visible="false">  
<HeaderTemplate>  
    <div>  
        <span>  
</HeaderTemplate>  
<ItemTemplate><li><%# Container.DataItem %></li></ItemTemplate>  
<FooterTemplate>  
</span>  
    </div>  
</FooterTemplate>  
</asp:Repeater> 

The asp.net designer is constantly regenerating and adding protected variables for myRepeater in the designer.cs file:

//ConcreteMobilFunnelPage.aspx.designer.cs
protected global::System.Web.UI.WebControls.Repeater myRepeater;

This causes a problem because it is not overriding the inherited myRepeater property, it is hiding it. Is there a way to get the designer to honor that myRepeater inherited property?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:31:06+00:00Added an answer on May 26, 2026 at 6:31 am

    It’s a bit more wordy, but I think the simplest workaround is to make the property abstract and implement it with the generated field as the backing field:

    //MobileFunnelPage.cs  
    public abstract class MobileFunnelPage : Page  
    {  
        public abstract Repeater MyRepeater { get; set; }  
    }
    
    //ConcreteMobileFunnelPage.aspx.cs  
    public class ConcreteMobileFunnelPage : MobileFunnelPage  
    {  
        public override Repeater MyRepeater {
            get {
               return myRepeater;
            }
            set {
               myRepeater = value;
            }
        }
    }
    

    (Here myRepeater is the protected auto-generated field, and I’ve renamed the public property to MyRepeater)

    As an aside, you should probably remove the setter, I don’t think it serves any purpose here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In MVC2 we have a custom base class public class OurViewPage<TModel,TPresentationModel> : ViewPage<TModel> so
I have a custom base user control in silverlight. <UserControl x:Class=Problemo.MyBaseControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:d=http://schemas.microsoft.com/expression/blend/2008
I'm trying to retrieve a custom Attribute set on a page's class from inside
I have built the following custom control that I have built and I set
I've create a custom attribute for my web pages... In the base page class
I have a custom exception class: public class MyException: Exception { public MyException(MyExceptionEnum myError)
I have a custom Grid view object that inherits from the base System.Web.UI.WebControls.GridView. The
I have a standard ActiveRecord model with the following: class MyModel < ActiveRecord::Base custom_method
I have custom classes that I currently instantiate within App.xaml as resources. I want
I have custom event that has several different subscribers who will all use the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.