Umbraco Razor, Dealing with the Issue of state in Forms

<select name="fr" style="">
<option value="All">All Regions</option>
<option value="North" @if (region=="North"){@Html.Raw("selected")}>North</option>
  <option value="East" @if (region=="East"){@Html.Raw("selected")}>East</option>
<option value="South East" @if (region=="South East"){@Html.Raw("selected")}>South East</option>
<option value="West" @if (region=="West"){@Html.Raw("selected")}>West</option>


Popular posts from this blog

Umbraco 7 - C# Razor - Passing a parameter variable from a Template to a Partial View.

Umbraco 7 Hide a page from Navigation or Sub Navigation with umbracoNaviHide using Razor in a template or partial view

Umbraco Razor Sort Nodes Ascending or Descending