PoshCode Archive  Artifact [2d767a5d61]

Artifact 2d767a5d61120954317aec83bfb2fdad98a5daba8fc61d0259f3dcf43e259370:

  • File ASPX-Mailbox-2-of-6.ps1 — part of check-in [cc89873edf] at 2018-06-10 13:49:27 on branch trunk — This is part 2 of a 6 part mailbox creation web site. (user: Karl Mitschke size: 1289)

# encoding: ascii
# api: powershell
# title: ASPX Mailbox  (2 of 6)
# description: This is part 2 of a 6 part mailbox creation web site.
# version: 0.1
# type: class
# author: Karl Mitschke
# license: CC0
# x-poshcode-id: 506
# x-archived: 2015-12-29T02:50:12
# x-published: 2008-08-08T11:36:00
#
# This site allows local administrators to create and delete mailboxes, and change email addresses.  Save this as MailboxTasks.aspx.cs
#
public partial class MailboxTasks : System.Web.UI.Page
{
    private void Page_Load(object sender, System.EventArgs e)
    {
        System.Text.StringBuilder sbValid = new System.Text.StringBuilder();
        sbValid.Append("if (typeof(Page_ClientValidate) == 'function') { ");
        sbValid.Append("if (Page_ClientValidate() == false) { return false; }} ");
        sbValid.Append("this.value = 'Please wait...';");
        sbValid.Append("this.disabled = true;");
        sbValid.Append("document.all.btnNext.disabled = true;");
        sbValid.Append(ClientScript.GetPostBackEventReference(this.btnNext,""));
        sbValid.Append(";");
        this.btnNext.Attributes.Add("onclick", sbValid.ToString());
        if (IsPostBack)
        {
            Server.Transfer("MailboxConfirm.aspx", true);
        }
    }
}