Author: cookie_powered | Posted on: 6/4/2009 8:34:42 AM | Views : 535

Hi,
I am creating dynamic web controls with dynamic validation in my code behind file and then adding them to my form. i.e.:

Dim textbox1 As TextBox = New TextBox()
textbox1.ID = StrQ_Num
Form1.Controls.Add(textbox1)Dim val As New RequiredFieldValidator
val.ID = StrQ_Val
val.ControlToValidate = StrQ_Num
val.Text = "* Required"
val.ErrorMessage = "You must provide an answer for this questions: " & StrQ_Text
Form1.Controls.Add(val) All working fine until I want to create validation for my checkboxs, as you can not use RequiredFieldValidator.I want to use the CustomValidator but unsure on how to use the <asp:CustomValidator OnServerValidate = "FunctionNameHere" within vb.I have tried:

Go to the complete details ...