C
caviar
My defaultvalue attribute is not working. If i drop this control from
thetoolbox onto my page
the properties are empty. They keep being empty if i run this page on the
server. The only way to fix it is to initialize the property hidden internal
field whit the same value.
Is this by design or is something else wrong?
regards hj
public class WebChangePasswordControl : System.Web.UI.WebControls.WebControl
private string _title; //empty prop everywhere no def value
//private string _title = "Change Password"; //Now the property has an
default value..
[Bindable(false), Category("Appearance"),
DefaultValue("Change Password")]
public string Title
{
get{return _title;}
set{_title = value;}
}
thetoolbox onto my page
the properties are empty. They keep being empty if i run this page on the
server. The only way to fix it is to initialize the property hidden internal
field whit the same value.
Is this by design or is something else wrong?
regards hj
public class WebChangePasswordControl : System.Web.UI.WebControls.WebControl
private string _title; //empty prop everywhere no def value
//private string _title = "Change Password"; //Now the property has an
default value..
[Bindable(false), Category("Appearance"),
DefaultValue("Change Password")]
public string Title
{
get{return _title;}
set{_title = value;}
}