Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

How to make a default value in a block types property?

$
0
0

When you create a new block type in code, how do you make it default to a value for a property?

E.g. below we have a property of "type".   How would we make it default to a default value, e..g. "heavy" if that is used 99% of the time?

        [Display(
            Order = 2, 
            GroupName = SystemTabNames.Content,
            Description = "type of item, e.g. heavy"
            )]
        [Required]
        public virtual string type { get; set; }

Viewing all articles
Browse latest Browse all 8020

Trending Articles