.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

RangeValidator - only MinimumValue or only MaximumValue

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
 
It can only be used in RangeValidator MinimumValue?I need two texts to determine the minimum and maximum.<asp:RangeValidator ID="RangeValidator1" runat="server"        ErrorMessage="Payment amount is too small!" ControlToValidate="AmountDeposit"        ValidationGroup="ErrormessageValidationGroup" MinimumValue="1" Type="Integer" Display="Dynamic">        <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/warning.png" ImageAlign="TextTop" /></asp:RangeValidator><asp:RangeValidator ID="RangeValidator1" runat="server"         ErrorMessage="The amount of payment is too high!" ControlToValidate="AmountDeposit"         ValidationGroup="ErrormessageValidationGroup" MaximumValue="10000" Type="Integer" Display="Dynamic">         <asp:Image ID="Image14" runat="server" ImageUrl="~/Images/warning.png" ImageAlign="TextTop" /></asp:RangeValidator>It is possible?


View Complete Post


More Related Resource Links

problem on Page_PreRender with RangeValidator control and programmatically setting Maximum and Minim

  
I am new to the ASP.NET /C# dev. I run into a weird bug when using the RangeValidator Control inside a Formview. I have my DateTime field with validator and it work fine until I submit the page, it actually insert the row into the database but then when the page reload I get the following exception.Server Error in '/Budget' Application. The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'.] System.Web.UI.WebControls.RangeValidator.ValidateValues() +1077011 System.Web.UI.WebControls.RangeValidator.ControlPropertiesValid() +12

Ajax RangeValidator

  
Hi All   I have a Ajax RangeValidator which is bound to a TextBox.<asp:TextBox ID="tbFromDate" runat="server" Width="85px"></asp:TextBox> <asp:MaskedEditExtender ID="meeFromDate" runat="server" TargetControlID="tbFromDate" UserDateFormat="DayMonthYear" Mask="99/99/9999" Enabled="True" ClearMaskOnLostFocus="False"> </asp:MaskedEditExtender> <asp:CalendarExtender ID="ceFromDate" runat="server" TargetControlID="tbFromDate" PopupPosition="Right" Format="dd/MM/yyyy" PopupButtonID="ibFromDate"> </asp:CalendarExtender> <asp:ImageButton ID="ibFromDate" runat="server" ImageUrl="~/Images/Calendar.bmp" /> <asp:RangeValidator ID="rvFromDate" runat="server" ControlToValidate="tbFromDate" ErrorMessage="Valid Date?"></asp:RangeValidator>       I get the following error message:-   Server Error in '/' Application. The MaximumValue 01/09/2010 cannot be less than the MinimumValue 05/05/2010 of rvFromDate. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend