C
Christophe Peillet
I am trying to extend the Page class with a new BasePage class containing
common elements required by all of our web pages. By itself this is a very
simply task, but whenever I add properties to the BasePage class they appear
in the Intellisense tool on the code-behind but not on the property explorer
in the visual layout tool, which is where I need to see them the most.
I am using MasterPages in the projects (and have also created a
BaseMasterPage class that extends MasterPage), and have the same problem.
Does anyone have any idea why the TitleResourceKey property does not show up
in the property explorer with pages that implement BasePage? I have even set
the Browsable attribute of the property to true (this property is normally
only useful when set to false, since true is the default value), also to no
avail.
A snippet of my BasePage class:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.ComponentModel;
using System.Reflection;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CompanyName.EEE.Web.Common.Localisation;
namespace CompanyName.EEE.Web.Common
{
/// <summary>
/// Adds common functionality to all CompanyName Support Pages.
/// </summary>
public class BasePage : Page
{
#region Private Fields
private string m_titleResourceKey;
#endregion
#region Public Properties
/// <summary>
/// Gets or sets the Title resource key.
/// </summary>
/// <value>The Title resource key.</value>
/// <seealso cref="T:ILocalisable"/>
/// <seealso cref="T:CompanyNameLocalisationKey"/>
/// <seealso cref="T:LocalisationManager"/>
/// <seealso cref="T:IResourceEngine"/>
[EpsonLocalisationKey("Title")]
[Bindable(true)]
[Description("The resource key used when translating the page
Title.")]
[Category("Appearance")]
[Browsable(true)]
public string TitleResourceKey
{
get
{
return m_titleResourceKey;
}
set
{
m_titleResourceKey = value;
}
}
#endregion
}
}
common elements required by all of our web pages. By itself this is a very
simply task, but whenever I add properties to the BasePage class they appear
in the Intellisense tool on the code-behind but not on the property explorer
in the visual layout tool, which is where I need to see them the most.
I am using MasterPages in the projects (and have also created a
BaseMasterPage class that extends MasterPage), and have the same problem.
Does anyone have any idea why the TitleResourceKey property does not show up
in the property explorer with pages that implement BasePage? I have even set
the Browsable attribute of the property to true (this property is normally
only useful when set to false, since true is the default value), also to no
avail.
A snippet of my BasePage class:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.ComponentModel;
using System.Reflection;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CompanyName.EEE.Web.Common.Localisation;
namespace CompanyName.EEE.Web.Common
{
/// <summary>
/// Adds common functionality to all CompanyName Support Pages.
/// </summary>
public class BasePage : Page
{
#region Private Fields
private string m_titleResourceKey;
#endregion
#region Public Properties
/// <summary>
/// Gets or sets the Title resource key.
/// </summary>
/// <value>The Title resource key.</value>
/// <seealso cref="T:ILocalisable"/>
/// <seealso cref="T:CompanyNameLocalisationKey"/>
/// <seealso cref="T:LocalisationManager"/>
/// <seealso cref="T:IResourceEngine"/>
[EpsonLocalisationKey("Title")]
[Bindable(true)]
[Description("The resource key used when translating the page
Title.")]
[Category("Appearance")]
[Browsable(true)]
public string TitleResourceKey
{
get
{
return m_titleResourceKey;
}
set
{
m_titleResourceKey = value;
}
}
#endregion
}
}