protected ProviderControlBase LoadControl(PortalModuleBase parentControl, string controlPath, string controlName)
        {
            string controlValue = "";

            controlPath = VirtualPathUtility.AppendTrailingSlash(VirtualPathUtility.Combine(controlPath, _info.VirtualPath));
            for (int i = 0; i < _info.Controls.Length; i++)
            {
                if (_info.Controls[i].Name == controlName)
                {
                    controlValue = _info.Controls[i].Value;
                    break;
                }
            }
            controlPath = VirtualPathUtility.Combine(controlPath, controlValue);

            ProviderControlBase childControl = (ProviderControlBase)parentControl.LoadControl(controlPath);

            childControl.ParentControl = parentControl;

            return(childControl);
        }
        /// <summary>
        /// Builds the proper admin control according the modulePath specified.
        /// <strong>NOTE: The control must have suffix of "Admin"</strong>
        /// </summary>
        /// <param name="parentControl">Parent for the checkout control.</param>
        /// <param name="modulePath">Path to the controllers for this Provider.</param>
        /// <returns>The admin control for configured provider</returns>
        public ProviderControlBase GetAdminControl(PortalModuleBase parentControl, string modulePath)
        {
            ProviderControlBase adminControl = LoadControl(parentControl, modulePath, "Admin");

            return(adminControl);
        }
        /// <summary>
        /// Builds the proper checkout control according the modulePath specified.
        /// <strong>NOTE: The control must have suffix of "Checkout"</strong>
        /// </summary>
        /// <param name="parentControl">Parent for the checkout control.</param>
        /// <param name="modulePath">Path to the address controllers for this Provider.</param>
        /// <returns>The checkout control for configured provider</returns>
        public ProviderControlBase GetCheckoutControl(PortalModuleBase parentControl, string modulePath)
        {
            ProviderControlBase checkoutControl = LoadControl(parentControl, modulePath, "Checkout");

            return(checkoutControl);
        }