Private Shared Function ColorToHex(inputColor As Color) As [String]
Return ColorTranslator.ToHtml(inputColor)
End Function
Private Shared Function HexToColor(hexInput As String) As Color
Return ColorTranslator.FromHtml(hexInput)
End Function
HTML5 introduced the new <datalist> tag, which specifies a list of predefined <input> element options. It is used to provide the autocomplete feature on <input> elements. Users will see a drop-down list of pre-defined options as they input data. This element has no other attributes than the global attributes, common to all elements. The id of the datalist element must match with the list attribute of the input box.Keep in mind that Safari doesn’t support datalist yet. If you are using this element with an unsupported (older) browser version, the most browsers will simply ignores the datalist tag and render rest of the webpage. Internet Explorer 9 and below is a little bit special, it will simply print the option values to the page (a possible workaround can be found at http://viralpatel.net/).
Usage
Here you can see a Basic example on how to use the datalist tag in HTML5.
XHTML
1
2
3
4
5
6
7
8
9
<input name="datalistTest"list="datalistTest" />
<datalist id="datalistTest">
<option value="codesnippets">
<option value="fesslersoft">
<option value="code">
<option value="snippets">
<option value="fessler">
<option value="soft">
</datalist>
Live Sample
Keep in mind that this Live-Example only works on supported Browsers.