How do i convert this line of code to eg, <li>DE</li>
optionlist.Append("<option value=\"" +
DB.RSField(rs, "Name") +
"\" " +
CommonLogic.IIF(currentLocaleSetting == DB.RSField(rs, "Name"), " selected ", String.Empty) +
">" +
DB.RSField(rs, "Description") +
"</option>");
I also tried this:
optionlist.Append("<li>" + "a href=" +
"/setlocale.aspx?returnURL=Default.aspx&localesetting=" + DB.RSField(rs, "Name") +
"</a>" + CommonLogic.IIF(currentLocaleSetting == DB.RSField(rs, "Name"), "", String.Empty) + "" + DB.RSField(rs, "Description") + "</li>");
But this creates the the following which is WRONG:
a href=/setlocale.aspx?returnURL=Default.aspx&localesetting=de-DEDeutsch
The code should look like this in order to generate list items:
This will “lose” the description though, so to add it as well:
The above will show the description next to each name.