Rock.Web.UI.Controls.KeyValueList.WriteKeyHtml C# (CSharp) Method

WriteKeyHtml() private method

Writes the key HTML.
private WriteKeyHtml ( StringBuilder html ) : void
html StringBuilder The HTML.
return void
        private void WriteKeyHtml( StringBuilder html )
        {
            if ( CustomKeys != null && CustomKeys.Any() )
            {
                html.Append( @"<select class=""key-value-key form-control input-width-md js-key-value-input"">" );
                foreach ( var key in CustomKeys )
                {
                    html.AppendFormat( @"<option value=""{0}"">{1}</option>", key.Key, key.Value );
                }
                html.Append( @"</select>" );
            }
            else
            {
                html.AppendFormat( @"<input class=""key-value-key form-control input-width-md js-key-value-input"" type=""text"" placeholder=""{0}""></input> ", KeyPrompt );
            }
        }