public IEncodedString CountrySelectList(NBrightInfo info, String xpath, String attributes = "", Boolean allowEmpty = true) { var rtnList = NBrightBuyUtils.GetCountryList(); if (attributes.StartsWith("ResourceKey:")) { attributes = ResourceKey(attributes.Replace("ResourceKey:", "")).ToString(); } var strOut = ""; var upd = getUpdateAttr(xpath, attributes); var id = getIdFromXpath(xpath); strOut = "<select id='" + id + "' " + upd + " " + attributes + ">"; var s = ""; if (allowEmpty) { strOut += " <option value=''></option>"; } foreach (var tItem in rtnList) { if (info.GetXmlProperty(xpath) == tItem.Key.ToString()) { s = "selected"; } else { s = ""; } strOut += " <option value='" + tItem.Key.ToString() + "' " + s + ">" + tItem.Value + "</option>"; } strOut += "</select>"; return(new RawString(strOut)); }