Hi,
Essentially I create a textbox dynamically and assign it a custom validator as shown below:-
Protected Overrides Sub CreateChildControls()
myTextBox.ID = UniqueID
Controls.Add(myTextBox)
MyID = myTextBox.ID
myValidator.ErrorMessage = "Cannot be blank"
myValidator.Display = ValidatorDisplay.Dynamic
myValidator.ControlToValidate = MyID
Controls.Add(myValidator)
End Sub
The problem is that - using this method as opposed to the render/addattributestorender path - I cannot cause the postback event to fire.
Can anybody help me out? Many thanks.
Glyn.
Essentially I create a textbox dynamically and assign it a custom validator as shown below:-
Protected Overrides Sub CreateChildControls()
myTextBox.ID = UniqueID
Controls.Add(myTextBox)
MyID = myTextBox.ID
myValidator.ErrorMessage = "Cannot be blank"
myValidator.Display = ValidatorDisplay.Dynamic
myValidator.ControlToValidate = MyID
Controls.Add(myValidator)
End Sub
The problem is that - using this method as opposed to the render/addattributestorender path - I cannot cause the postback event to fire.
Can anybody help me out? Many thanks.
Glyn.