At least one entry is filled

I’m having trouble on how am I be able to validate multiple entries (textbox control). It seems that using custom validate is not possible because each validator has one control to validate. In my case, I have to determine if at least one entry was filled with data. Can anyone help me.

You can use a custom validator same as mentioned in your other tread. But then in the if, check all your txtboxes for values

Am I going also to set the custom validator’s ControlToValidate property?

The simple anwser is, you can’t. ASP.NET wasn’t set up to handle multiple contols for one validation. However, you can use CustomValidator to check ALL of the controls in one place.



<asp:CustomValidator ID="CustomValidator1" runat="server" 
OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>




Then, you can validate all of the contols in one area, OnServerValidate_ServerValidate event handler.

Yeah, it kind of sucks .NET hasn’t addressed this senerio.

EDIT: Damn. You beat me to it.

Thank you so much guys…