Umbraco Razor, Dealing with the Issue of state in Forms

Solution:
<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>
</select>

Comments

Popular posts from this blog

Umbraco - Reset the Admin Password via SQL Server

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco

Umbraco Macro for IFrame when Embedding Video, Vimeo Universal Player, or other types of IFrame on to a Page XSLT version and Razor Version