I have a page with a compare validator on it. (hence the title) I am trying to set the valuetocompare property at page load, but verifaction always fails. I even have it print out (response.write) the valuetocompare and copy and paste does not work. If I set value to something like "1" it works but if I use a dynamic variable it doesn't work
capvalidator.ValueToCompare = code1
<asp:textbox id="cap1" size="10" maxlength="7" runat="server"/>
<asp:CompareValidator ID="capvalidator" runat="server"
ControlToValidate="cap1"
ErrorMessage="message."
Display="Dynamic">*</asp:CompareValidator>
...
Go to the complete details ...