我如何将这行代码转换为例如, <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>");
我也试过这个:
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>");
但这会产生以下错误:
a href=/setlocale.aspx?returnURL=Default.aspx&localesetting=de-DEDeutsch