S
Sfw_Kris
Good afternoon,
I have begun creating a custom web control in .NET 2.0. I have overridden
the height and width attributes so that I can supply a DefaultValue that is
more appropriate to the control, however the control does not reflect this
default when dropped into the designer or when run up in a web page. I get
the sense that perhaps I'm not setting the DefaultValue attribute correctly,
or that I've missed some additional piece of coding that is required. I've
included an example of one of my properties below, note I also attempted
setting the DefaultValue as just an integer. Any suggestions?
Thanks.
[DefaultValue(typeof(Unit), "200px")]
public override Unit Height
{
get
{
return this.pnlMain.Height;
}
set
{
this.pnlMain.Height = value;
}
}
I have begun creating a custom web control in .NET 2.0. I have overridden
the height and width attributes so that I can supply a DefaultValue that is
more appropriate to the control, however the control does not reflect this
default when dropped into the designer or when run up in a web page. I get
the sense that perhaps I'm not setting the DefaultValue attribute correctly,
or that I've missed some additional piece of coding that is required. I've
included an example of one of my properties below, note I also attempted
setting the DefaultValue as just an integer. Any suggestions?
Thanks.
[DefaultValue(typeof(Unit), "200px")]
public override Unit Height
{
get
{
return this.pnlMain.Height;
}
set
{
this.pnlMain.Height = value;
}
}