public static bool IsDebug(this HtmlHelper htmlHelper)
{
#if DEBUG
return true;
#else
return false;
#endif
}
Then on our view, we could call the method:
@if (Html.IsDebug())
{
@Html.Raw("<span style='color: red'>DEBUGGING MODE IS ON</span>");
}

No comments:
Post a Comment