Skip to content

Instantly share code, notes, and snippets.

@EdPitt
EdPitt / gist:3010693
Created June 28, 2012 11:03
Blocking UI while loading Ajax UpdatePanel in ASP.NET
//include the jquery.blockui.js plugin on your page first
<script type="text/javascript">
Page = Sys.WebForms.PageRequestManager.getInstance();
Page.add_beginRequest(OnBeginRequest);
Page.add_endRequest(endRequest);
function OnBeginRequest(sender, args) {
$.blockUI();
}
@DaveGreasley
DaveGreasley / BackofficeUserHelper.cs
Last active December 29, 2017 19:08
A helper class for Umbraco 7+ to get the currently logged on back office user from a non-backoffice context.
/// <summary>
/// A helper class for Umbraco 7+ to get the currently logged on back office user from a non-backoffice context.
/// </summary>
public static class BackofficeUserHelper
{
const string BackofficeIdentityKey = "UmbracoBackofficeIdentity";
/// <summary>
/// The <c>UmbracoBackOfficeIdentity</c> representing the currently logged on Back Office user
/// </summary>