Skip to content

Instantly share code, notes, and snippets.

@dcarroll
Created June 23, 2015 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcarroll/8d904d3b7890f63d2fd6 to your computer and use it in GitHub Desktop.
Save dcarroll/8d904d3b7890f63d2fd6 to your computer and use it in GitHub Desktop.
Unexpected Errors
@if (ViewBag.ErrorMessage == "AuthorizationRequired")
{
<p>You have to sign-in to @ViewBag.OperationName. Click <a href="@ViewBag.AuthorizationUrl" title="here">here</a> to sign-in.</p>
<p>@ViewBag.ErrorMessage</p>
}
@if (ViewBag.ErrorMessage != "AuthorizationRequired" && ViewBag.ErrorMessage != null)
{
<p class="text-danger">
An unexpected error occurred while attempting to @ViewBag.OperationName<br />
<strong>Error: @ViewBag.ErrorMessage</strong>
</p>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment