/// <summary>
        /// Used to bind a repeater for a given Panel to a List of Modules.  Each panel is defined by a type.  Each type can be assigned
        /// one or more modules.
        /// </summary>
        /// <param name="repeater">A repeater control is passed by ref to this method.</param>
        /// <param name="paneltype">The type of the Panel as defined in the PresentationXML //Panel/@Type attribute</param>
        public void BindRepeaterToPanel(ref Repeater repeater, List <Framework.Utilities.Panel> panels)
        {
            Framework.Utilities.Panel rtnpanel = new Profiles.Framework.Utilities.Panel();

            try
            {
                if (panels.Count() == 1)
                {
                    foreach (Framework.Utilities.Panel f in panels)
                    {
                        rtnpanel.Modules = f.Modules;
                    }
                }
                else
                {
                    rtnpanel.Modules = new List <Utilities.Module>();

                    foreach (Framework.Utilities.Panel f in panels)
                    {
                        if (f.Alias != string.Empty && this.Tab != string.Empty)
                        {
                            f.DefaultTab = false;
                        }
                        else if (f.Alias != string.Empty && f.TabType == "Default" && this.Tab == string.Empty)
                        {
                            f.DefaultTab = true;
                        }

                        if ((f.Alias == this.Tab) || (f.DefaultTab))
                        {
                            foreach (Utilities.Module m in f.Modules)
                            {
                                rtnpanel.Modules.Add(m);
                            }
                        }
                    }
                }
            }
            catch (Exception ex) { Framework.Utilities.DebugLogging.Log(ex.Message + " ++ " + ex.StackTrace); }

            repeater.DataSource = rtnpanel.Modules;
            repeater.DataBind();
        }
        /// <summary>
        /// Used to bind a repeater for a given Panel to a List of Modules.  Each panel is defined by a type.  Each type can be assigned
        /// one or more modules. 
        /// </summary>
        /// <param name="repeater">A repeater control is passed by ref to this method.</param>
        /// <param name="paneltype">The type of the Panel as defined in the PresentationXML //Panel/@Type attribute</param>
        public void BindRepeaterToPanel(ref Repeater repeater, List<Framework.Utilities.Panel> panels)
        {
            Framework.Utilities.Panel rtnpanel = new Profiles.Framework.Utilities.Panel();

            try
            {
                if (panels.Count() == 1)
                {
                    foreach (Framework.Utilities.Panel f in panels)
                        rtnpanel.Modules = f.Modules;
                }
                else
                {
                    rtnpanel.Modules = new List<Utilities.Module>();

                    foreach (Framework.Utilities.Panel f in panels)
                    {
                        if (f.Alias != string.Empty && this.Tab != string.Empty)
                            f.DefaultTab = false;
                        else if (f.Alias != string.Empty && f.TabType == "Default" && this.Tab == string.Empty)
                            f.DefaultTab = true;

                        if ((f.Alias == this.Tab) || (f.DefaultTab))
                        {
                            foreach (Utilities.Module m in f.Modules)
                                rtnpanel.Modules.Add(m);
                        }

                    }
                }
            }
            catch (Exception ex) { Framework.Utilities.DebugLogging.Log(ex.Message + " ++ " + ex.StackTrace); }

            repeater.DataSource = rtnpanel.Modules;
            repeater.DataBind();
        }