Is there any element that has both text and value properties??
I want to bind Different values for text and value properties using knockout .
The requirement is to show the different text and save the different value as we do with the the dropdown options..
As an work around, you can use some delimiter (separator) to store the value in single attribute.
In the example below, I have used ^^ as the delimeter (separator). You can then split the value with this special character(s) and use it as two different values.
You may use single character or multiple characters depending on your data.
However, html elements also support custom attributes, i.e., you can write your own attributes (which are not defined by browser), but that could trouble the html validation tools. But, with HTML5, you have data- attributes. See this reference:
Thanks for the reply.
You’re welcome.. Have a nice day!