Creating a default value for a user control property
In Sitefinity 3.x you used to be able to add the [DefaultValue()] Attribute to a property. This doesn't seem to be supported anymore in SF 4 - is there a new way to initialize properties with default values? Should this be done in the control's constructor?
Hello,
I believe a similar code should do the work:
private string _name;[DefaultValue("James")] public string Name get return _name; set _name = value;