public void AddValidatorControl(ValidateRenderControl control) { if (control != null) { this.Controls.Add(control); } }
internal override ValidateRenderControl GenerateAppendScript() { ValidateRenderControl control = new ValidateRenderControl(); control.Text = string.Format(CultureInfo.InvariantCulture, "appendValid(new MoneyRangeValidator('{0}', {1}, {2}, '{3}', '{4}'));", new object[] { base.Owner.TargetClientId, MinValue, MaxValue, ErrorMessage, string.Empty }); return(control); }
public void AddValidatorControl(ValidateRenderControl control) { if (control != null) { Controls.Add(control); } }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', 1, 10, {1}, '{2}', '{3}', '{4}'))", new object[] { base.Owner.TargetClientId, base.Owner.Nullable ? "true" : "false", @"(0|(0+(\\.[0-9]{1,2}))|[1-9]\\d*(\\.\\d{1,2})?)", string.Empty, ErrorMessage }); return(control); }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', {1}, {2}, {3}, {4}, '{5}', '{6}'))", new object[] { base.Owner.TargetClientId, LowerBound, UpperBound, base.Owner.Nullable ? "true" : "false", string.IsNullOrEmpty(Regex) ? "null" : ("'" + Regex + "'"), string.Empty, ErrorMessage }); return(control); }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); WebControl control2 = (WebControl) base.Owner.NamingContainer.FindControl(DestinationId); if (control2 != null) { control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new CompareValidator('{0}', '{1}', '{2}'));", new object[] { base.Owner.TargetClientId, control2.ClientID, ErrorMessage }); } return control; }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); WebControl control2 = (WebControl)base.Owner.NamingContainer.FindControl(this.DestinationId); if (control2 != null) { control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new CompareValidator('{0}', '{1}', '{2}'));", new object[] { base.Owner.TargetClientId, control2.ClientID, this.ErrorMessage }); } return(control); }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); WebControl control2 = (WebControl) base.Owner.NamingContainer.FindControl(base.Owner.ControlToValidate); if (control2 != null) { control2.Attributes.Add("groupname", base.Owner.TargetClientId); control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new SelectValidator('{0}', {1}, '{2}'))", new object[] { base.Owner.TargetClientId, base.Owner.Nullable ? "true" : "false", this.ErrorMessage }); } return control; }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); WebControl control2 = (WebControl)base.Owner.NamingContainer.FindControl(base.Owner.ControlToValidate); if (control2 != null) { control2.Attributes.Add("groupname", base.Owner.TargetClientId); control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new SelectValidator('{0}', {1}, '{2}'))", new object[] { base.Owner.TargetClientId, base.Owner.Nullable ? "true" : "false", ErrorMessage }); } return(control); }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl { Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', 1, 10, {1}, '{2}', '{3}', '{4}'", new object[] { base.Owner.TargetClientId, base.Owner.Nullable ? "true" : "false", @"(0|-?[0-9]\\d*(\\.\\d{1,2})?)", base.Owner.Nullable ? base.Owner.FocusMessage : (base.Owner.RequiredAlt + "<br/>" + base.Owner.FocusMessage), base.Owner.Nullable ? this.ErrorMessage : (base.Owner.RequiredMessage + "<br/>" + this.ErrorMessage) }) }; if (base.Owner.Nullable) { control.Text = control.Text + string.Format(CultureInfo.InvariantCulture, ", '{0}'", new object[] { base.Owner.NullMessage }); } control.Text = control.Text + "));"; return(control); }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl { Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', {1}, {2}, {3}, {4}, '{5}', '{6}'", new object[] { base.Owner.TargetClientId, this.LowerBound, this.UpperBound, base.Owner.Nullable ? "true" : "false", string.IsNullOrEmpty(this.Regex) ? "null" : ("'" + this.Regex + "'"), base.Owner.Nullable ? base.Owner.FocusMessage : (base.Owner.RequiredAlt + "<br/>" + base.Owner.FocusMessage), base.Owner.Nullable ? this.ErrorMessage : (base.Owner.RequiredMessage + "<br/>" + this.ErrorMessage) }) }; if (base.Owner.Nullable) { control.Text = control.Text + string.Format(CultureInfo.InvariantCulture, ", '{0}'", new object[] { base.Owner.NullMessage }); } control.Text = control.Text + "));"; return control; }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl { Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', 1, 10, {1}, '{2}', '{3}', '{4}'", new object[] { base.Owner.TargetClientId, base.Owner.Nullable ? "true" : "false", @"-?[0-9]\\d*", base.Owner.Nullable ? base.Owner.FocusMessage : (base.Owner.RequiredAlt + "<br/>" + base.Owner.FocusMessage), base.Owner.Nullable ? this.ErrorMessage : (base.Owner.RequiredMessage + "<br/>" + this.ErrorMessage) }) }; if (base.Owner.Nullable) { control.Text = control.Text + string.Format(CultureInfo.InvariantCulture, ", '{0}'", new object[] { base.Owner.NullMessage }); } control.Text = control.Text + "));"; return control; }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl { Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', {1}, {2}, {3}, {4}, '{5}', '{6}'", new object[] { base.Owner.TargetClientId, this.LowerBound, this.UpperBound, base.Owner.Nullable ? "true" : "false", string.IsNullOrEmpty(this.Regex) ? "null" : ("'" + this.Regex + "'"), base.Owner.Nullable ? base.Owner.FocusMessage : (base.Owner.RequiredAlt + "<br/>" + base.Owner.FocusMessage), base.Owner.Nullable ? this.ErrorMessage : (base.Owner.RequiredMessage + "<br/>" + this.ErrorMessage) }) }; if (base.Owner.Nullable) { control.Text = control.Text + string.Format(CultureInfo.InvariantCulture, ", '{0}'", new object[] { base.Owner.NullMessage }); } control.Text = control.Text + "));"; return(control); }
internal override ValidateRenderControl GenerateAppendScript() { ValidateRenderControl control = new ValidateRenderControl(); control.Text = string.Format(CultureInfo.InvariantCulture, "appendValid(new MoneyRangeValidator('{0}', {1}, {2}, '{3}', '{4}'));", new object[] { base.Owner.TargetClientId, MinValue, MaxValue, ErrorMessage, string.Empty }); return control; }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', 1, 10, {1}, '{2}', '{3}', '{4}'))", new object[] { base.Owner.TargetClientId, base.Owner.Nullable ? "true" : "false", @"(0|(0+(\\.[0-9]{1,2}))|[1-9]\\d*(\\.\\d{1,2})?)", string.Empty, ErrorMessage }); return control; }
internal override ValidateRenderControl GenerateInitScript() { ValidateRenderControl control = new ValidateRenderControl(); control.Text = string.Format(CultureInfo.InvariantCulture, "initValid(new InputValidator('{0}', {1}, {2}, {3}, {4}, '{5}', '{6}'))", new object[] { base.Owner.TargetClientId, LowerBound, UpperBound, base.Owner.Nullable ? "true" : "false", string.IsNullOrEmpty(Regex) ? "null" : ("'" + Regex + "'"), string.Empty, ErrorMessage }); return control; }