Dim txt As New TextBox()
txt.ID = "txt" & i.ToString()
txt.MaxLength = 6
txt.Attributes.Add("onblur", "validate(this);")
Dim ftext As New AjaxControlToolkit.FilteredTextBoxExtender()
ftext.TargetControlID = txt.ClientID
ftext.FilterType = AjaxControlToolkit.FilterTypes.Numbers Or AjaxControlToolkit.FilterTypes.Custom
ftext.ValidChars = "."
Dim req As New RequiredFieldValidator()
req.ID = "req" & i.ToString()
req.ControlToValidate = txt.ClientID
req.ErrorMessage = "*"
req.ForeColor = Drawing.Color.Red
req.Enabled = True
req.Visible = True
req.EnableViewState = True
req.Display = ValidatorDisplay.Dynamic
req.ValidationGroup = "rej"
No comments:
Post a Comment