CompareValidator works in listview's editItemTemplate but not in insertitemtemplate

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2009-07-09T16:55:32Z Indexed on 2010/03/28 18:03 UTC
Read the original article Hit count: 245

Hi,

I have a validation problem

I have a listview, in the edit item template I have two composite controls with a textbox inside

I put a comparevalidator on it

<asp:CompareValidator ID="myCompareValidator" runat="server"
ControlToValidate="mycompositecontrol1" ControlToCompare="mycompositecontrol2"
Operator="GreaterThanEqual" Type="Date" Display="Dynamic" ErrorMessage="there is an error !"
Text="!"  ValidationGroup="myValidationGroup" />

It works great !

so I do exactly the same operation in the InserItemTemplate (It's a copy/paste)

but this time, it doesn't work, I have no error message in my validationsummary and near my control to validate!

If you know that problem, help me please

thanks in advance

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about custom-server-controls