Click here to Skip to main content
15,913,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

Please suggest,


Here I have used regularExpressionValidator for validating testbox value,
After Adding value and then Save ,textbox value get save,
but when i update this value ,then i got page.isvalid=false.

XML
<asp:RegularExpressionValidator ID="RegtxtEstimatedCurrentValue" runat="server" ControlToValidate="txtEstimatedCurrentValue"Display="none" ErrorMessage="Please enter valid amount." ValidationExpression="([0-9]*(\.[0-9]+)?)|([0-9]+)"ValidationGroup="valgrpPropertyVal"></asp:RegularExpressionValidator>
                                                                           <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender16" runat="server" TargetControlID="RegtxtEstimatedCurrentValue"                      WarningIconImageUrl="../Images/Error.png" Enabled="True">
                                                                           </cc1:ValidatorCalloutExtender>



codebehind-----

btncave_click()
{
if(this.isvalid == true)
{
save data---
}
}



Please tell me the solution
Posted
Updated 7-Mar-12 0:29am
v2
Comments
OriginalGriff 7-Mar-12 6:22am    
We can't.
We don't know what your regular expression looks like, or what data you are entering in the textbox.
Without those, we would be guessing...
Use the "Improve question" widget to edit your question and provide better information.

1 solution

Is the new value valid in the first place?

Have you checked the contents of your textbox in the btncave_click()
method? Check the page lifetime cycle, that's often the culprit in such cases.
Page lifetime cycle[^]

Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900