Skip to content

Instantly share code, notes, and snippets.

View nul800sebastiaan's full-sized avatar
🔥

Sebastiaan Janssen nul800sebastiaan

🔥
View GitHub Profile
@helper RenderCountryOptions() {
<option>Choose a country...</option>
@foreach(var region in @Model.XPath("/root/Website/CountryList/CountryList[Country[not(active = 0)]]"))
{
<optgroup label="@region.Name">
@foreach(var country in @region.Children)
{
<option>@country.Name</option>
}
</optgroup>