Esempio n. 1
0
        /// <summary>
        /// Ons the load.
        /// </summary>
        /// <param name="e">E.</param>
        protected override void OnLoad(EventArgs e)
        {
            InstallationState status = InstallationManager.GetInstallationStatus(VersionInfo.CurrentAssemblyVersion);

            switch (status)
            {
            case InstallationState.NeedsInstallation:
            case InstallationState.NeedsUpgrade:
                EnsureInstallStep("Default.aspx", "Step02_ConfigureHost.aspx");
                break;

            default:
                HostInfo info = HostInfo.LoadHost(true /* suppressException */);

                if (info == null)
                {
                    EnsureInstallStep("Step02_ConfigureHost.aspx");
                }
                if (info != null && Config.BlogCount == 0)
                {
                    EnsureInstallStep("Step03_CreateBlog.aspx");
                }
                if (info != null && Config.BlogCount > 0)
                {
                    EnsureInstallStep("InstallationComplete.aspx");
                }
                break;
            }

            base.OnLoad(e);
        }
        protected override void OnLoad(EventArgs e)
        {
            if (InstallationManager.GetInstallationStatus(VersionInfo.CurrentAssemblyVersion) == InstallationState.Complete)
            {
                Response.Redirect("InstallationComplete.aspx");
            }

            btnInstallClick.Attributes["onclick"] = "this.disabled=true;" + ClientScript.GetPostBackEventReference(btnInstallClick, null);


            litDatabaseName.Text = Config.ConnectionString.Database;
        }