Rock.Web.UI.Controls.AttributeFieldObject.GetAttributeValue C# (CSharp) Method

GetAttributeValue() public method

Gets the value of an attribute key.
public GetAttributeValue ( string key ) : string
key string The key.
return string
        public string GetAttributeValue( string key )
        {
            if ( this.AttributeValues != null &&
                this.AttributeValues.ContainsKey( key ) )
            {
                return this.AttributeValues[key].Value;
            }

            if ( this.Attributes != null &&
                this.Attributes.ContainsKey( key ) )
            {
                return this.Attributes[key].DefaultValue;
            }

            return null;
        }