Skip to content

Instantly share code, notes, and snippets.

@DaveSussman
DaveSussman / RazorGuidTest
Created August 10, 2012 07:02
MVC3 Razor Testing for Empty Guid
<div>
@Html.TextBoxFor(m => Model.Id)<br />
@if (Model.Id == Guid.Empty)
{
<text>empty:</text>
@Html.TextBox("foo", @Model.Id)
@Html.TextBoxFor(m => Model.Id)
}
else
{