Error rendering Validator control
I have a composite control that has a validator in it, but the weird thing is, I have another composite control and the validator works in one, but not in the other. I have the same settings (just copied over); I can't figure it out. In CreateChildControls I have:
rfvSearchText = New RequiredFieldValidator
.ID = "rfvSearchText"
.Display = ValidatorDisplay.Static
.Text = "*"
.ErrorMessage = "Please enter search text"
.ToolTip = .ErrorMessage
.ControlToValidate = txtSearchText.ID
And in the Render method, I render it as such:
If (Me.SearchTextRequiredErrorMessage <> String.Empty) Then
It renders, but it shows by default, whereas the other one is hidden. Any idea why the * appears by default? This is at runtime, not design time. The * appears for the first control, but it properly hides it for the second one.