private void CheckDomain(ManualValidationEventArgs args)
        {
            // ensure domain name not empty
            reqDomainVal.Validate();
            //
            if (!reqDomainVal.IsValid)
            {
                return;
            }

            string domain = EnsureDomainCorrectness(txtDomainReg.Text);
            //
            CheckDomainResult result = StorefrontHelper.CheckDomain(ResellerId, domain, ddlTopLevelDoms.SelectedItem.Text);

            // domain is available for purchase
            if (result.Succeed && result.ResultCode == 0)
            {
                //
                lblDomainAvailable.Visible = true;
                //
                args.ContextIsValid = true;
                //
                return;
            }

            //
            if (result.Succeed && result.ResultCode != 0)
            {
                //
                args.ContextIsValid = false;
                // show error message
                ctxDomainValidator.ErrorMessage = GetSharedLocalizedString(Keys.ModuleName, "CHECK_DOMAIN." + (result.ResultCode * -1));
                //
                return;
            }

            //
            if (!result.Succeed)
            {
                //
                args.ContextIsValid = false;
                //
                ctxDomainValidator.ErrorMessage = result.ErrorMessage;
                //
                return;
            }

            //
            args.ContextIsValid = false;
        }
 protected void ctxValBillingCycles_EvaluatingContext(object sender, ManualValidationEventArgs e)
 {
     if (rblRecurringAddon.SelectedIndex == 1)
     {
         e.ContextIsValid = true;
         return;
     }
     // get addon cycles
     HostingPlanCycle[] cycles = ctlPlanCycles.GetHostingPlanCycles();
     //
     if (cycles != null && cycles.Length > 0)
     {
         e.ContextIsValid = true;
         return;
     }
     //
     e.ContextIsValid = false;
 }
		protected void ctxValBillingCycles_EvaluatingContext(object sender, ManualValidationEventArgs e)
		{
			if (rblRecurringAddon.SelectedIndex == 1)
			{
				e.ContextIsValid = true;
				return;
			}
			// get addon cycles
			HostingPlanCycle[] cycles = ctlPlanCycles.GetHostingPlanCycles();
			//
			if (cycles != null && cycles.Length > 0)
			{
				e.ContextIsValid = true;
				return;
			}
			//
			e.ContextIsValid = false;
		}
		private void CheckDomain(ManualValidationEventArgs args)
		{
			// ensure domain name not empty
			reqDomainVal.Validate();
			//
			if (!reqDomainVal.IsValid)
				return;

			string domain = EnsureDomainCorrectness(txtDomainReg.Text);
			//
			CheckDomainResult result = StorefrontHelper.CheckDomain(ResellerId, domain, ddlTopLevelDoms.SelectedItem.Text);

			// domain is available for purchase
			if (result.Succeed && result.ResultCode == 0)
			{
				//
				lblDomainAvailable.Visible = true;
				//
				args.ContextIsValid = true;
				//
				return;
			}

			//
			if (result.Succeed && result.ResultCode != 0)
			{
				//
				args.ContextIsValid = false;
				// show error message
				ctxDomainValidator.ErrorMessage = GetSharedLocalizedString(Keys.ModuleName, "CHECK_DOMAIN." + (result.ResultCode * -1));
				//
				return;
			}

			//
			if (!result.Succeed)
			{
				//
				args.ContextIsValid = false;
				//
				ctxDomainValidator.ErrorMessage = result.ErrorMessage;
				//
				return;
			}
			
			//
			args.ContextIsValid = false;
		}
		protected void ctxDomainValidator_EvaluatingContext(object sender, ManualValidationEventArgs e)
		{
			CheckDomain(e);
		}
 protected void ctxFormShieldValidator_EvaluatingContext(object sender, ManualValidationEventArgs args)
 {
     args.ContextIsValid = ctlNoBot.IsValid();
 }
 protected void ctxDomainValidator_EvaluatingContext(object sender, ManualValidationEventArgs e)
 {
     CheckDomain(e);
 }
		protected void ctxFormShieldValidator_EvaluatingContext(object sender, ManualValidationEventArgs args)
		{
			args.ContextIsValid = ctlNoBot.IsValid();
		}