protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (!Page.IsPostBack)
            {

                try
                {
                    LoadStates();

                    Address contactAddress = MTApp.ContactServices.Addresses.FindStoreContactAddress();

                    Country c = Country.FindByBvin(contactAddress.CountryBvin);
                    if (c != null)
                    {
                        inCountry.SelectedValue = c.IsoCode;
                    }
                    inAddress1.Text = contactAddress.Line1;
                    inAddress2.Text = contactAddress.Line2;
                    inCity.Text = contactAddress.City;
                    Region r = c.FindRegion(contactAddress.RegionBvin);
                    if (r != null)
                    {
                        inState.SelectedValue = r.Abbreviation;
                    }
                    inEmail.Text = MTApp.CurrentStore.Settings.MailServer.EmailForGeneral;
                    inPhone.Text = contactAddress.Phone;
                    inZip.Text = contactAddress.PostalCode;

                }

                catch (Exception Ex)
                {
                    msg.ShowException(Ex);
                }

                // Get License
                try
                {
                    BVSoftware.Shipping.Ups.Registration UPSReg = new BVSoftware.Shipping.Ups.Registration();
                    if (UPSReg.GetLicense(WebAppSettings.ShippingUpsServer) == true)
                    {
                        lblLicense.Text = Server.HtmlEncode(UPSReg.License);
                        lblLicense.Text = lblLicense.Text.Replace(((char)10).ToString(), "&nbsp;<br>");
                    }
                    else
                    {
                        msg.ShowError("There was an error getting a license agreement: " + UPSReg.ErrorMessage);
                    }
                    UPSReg = null;
                }
                catch (Exception Exx)
                {
                    msg.ShowWarning(Exx.Message + "There was an error loading a license agreement.");
                }

            }
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (!Page.IsPostBack)
            {
                try
                {
                    LoadStates();

                    Address contactAddress = MTApp.ContactServices.Addresses.FindStoreContactAddress();

                    Country c = Country.FindByBvin(contactAddress.CountryBvin);
                    if (c != null)
                    {
                        inCountry.SelectedValue = c.IsoCode;
                    }
                    inAddress1.Text = contactAddress.Line1;
                    inAddress2.Text = contactAddress.Line2;
                    inCity.Text     = contactAddress.City;
                    Region r = c.FindRegion(contactAddress.RegionBvin);
                    if (r != null)
                    {
                        inState.SelectedValue = r.Abbreviation;
                    }
                    inEmail.Text = MTApp.CurrentStore.Settings.MailServer.EmailForGeneral;
                    inPhone.Text = contactAddress.Phone;
                    inZip.Text   = contactAddress.PostalCode;
                }

                catch (Exception Ex)
                {
                    msg.ShowException(Ex);
                }

                // Get License
                try
                {
                    BVSoftware.Shipping.Ups.Registration UPSReg = new BVSoftware.Shipping.Ups.Registration();
                    if (UPSReg.GetLicense(WebAppSettings.ShippingUpsServer) == true)
                    {
                        lblLicense.Text = Server.HtmlEncode(UPSReg.License);
                        lblLicense.Text = lblLicense.Text.Replace(((char)10).ToString(), "&nbsp;<br>");
                    }
                    else
                    {
                        msg.ShowError("There was an error getting a license agreement: " + UPSReg.ErrorMessage);
                    }
                    UPSReg = null;
                }
                catch (Exception Exx)
                {
                    msg.ShowWarning(Exx.Message + "There was an error loading a license agreement.");
                }
            }
        }