/// <summary> /// Renders from offsets /// </summary> /// <param name="w"></param> /// <param name="offsets"></param> private void RenderOnce(StreamWriter w, string gadgetXml, string surface, string offsets) { InitRenderUserData(); OffsetItem offsetObj = null; if (!string.IsNullOrEmpty(offsets)) { offsetObj = new OffsetItem(offsets); } GadgetMaster gadget = GadgetMaster.CreateGadget(CurrentControlFactory.FactoryKey, gadgetXml, offsetObj); gadget.MyDataContext.Culture = CurrentCulture; if (RenderUsingData == RenderData.Sandbox) { AccountTestData.ResolveDataControlValues(gadget.MyDataContext, CurrentUser, CurrentUser, CurrentUserFriends); } else { //gadget.MyDataContext.ResolveDataValues(GetCurrentUserId()); } gadget.RenderContent(w, surface); if (chkDisposeGadget.Checked) { gadget.Dispose(); } }