/// ----------------------------------------------------------------------------- /// <summary> /// Page_Load runs when the control is loaded /// </summary> /// <remarks> /// </remarks> /// <history> /// </history> /// ----------------------------------------------------------------------------- protected void Page_Load(System.Object sender, System.EventArgs e) { try { base.Page_Load(sender, e); if (!Page.IsPostBack && !Page.IsCallback) { ServiceReference service = new ServiceReference("~/DesktopModules/ATI_Base/resources/services/StreamService.asmx"); service.InlineScript = true; ScriptManager.GetCurrent(Page).Services.Add(service); int numEntries = 3; if (Settings["NumEntries"] != null) { numEntries = Convert.ToInt32(Settings["NumEntries"]); } Affine.WebService.StreamService streamService = new WebService.StreamService(); string json = streamService.getRecentWorkouts(this.PortalId, 0, numEntries); ScriptManager.RegisterStartupScript(this, Page.GetType(), "WorkoutList", "$(function(){ Aqufit.Page.atiStreamScript.generateStreamDom('" + json + "'); });", true); } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }