Eric Mathay asked 2017-08-22 09:28:43 UTC
Hello,
I have created a Usercontrol containing 1 Label.
I have added a styleSheet control to the usercontrol. This adds a property 'CssClass' to label1 when in the Designer.
I want to expose the 'CssClass' property outside of the usercontrol by defining a new property, but cssclass isn't available.
Error CS1061 'Label' does not contain a definition for 'CssClass' and no extension method 'CssClass' accepting a first argument of type 'Label' could be found (are you missing a using directive or an assembly reference?)
namespace WebPage2
{
public partial class UserControl1 : Wisej.Web.UserControl
{
public override string Text
{
get { return label1.Text; }
set { label1.Text = value; }
}
public override string CssClass
{
get { return label1.CssClass; }
set { label1.cssclass = value; }
}
public UserControl1()
{
InitializeComponent();
}
}
}
Do I miss something ?
Best regards.
Eric Mathay asked 2017-08-22 09:28:43 UTC
Hello,
I have created a Usercontrol containing 1 Label.
I have added a styleSheet control to the usercontrol. This adds a property 'CssClass' to label1 when in the Designer.
I want to expose the 'CssClass' property outside of the usercontrol by defining a new property, but cssclass isn't available.
Error CS1061 'Label' does not contain a definition for 'CssClass' and no extension method 'CssClass' accepting a first argument of type 'Label' could be found (are you missing a using directive or an assembly reference?)
namespace WebPage2
{
public partial class UserControl1 : Wisej.Web.UserControl
{
public override string Text
{
get { return label1.Text; }
set { label1.Text = value; }
}
public override string CssClass
{
get { return label1.CssClass; }
set { label1.cssclass = value; }
}
public UserControl1()
{
InitializeComponent();
}
}
}
Do I miss something ?
Best regards.