31 questions
0 votes
1 answer
93 views
Conditional Required Field Validators
I have all fields set to required using the requiredfield control in asp.net but i need one field to change its requiredfield control to disabled depending on a radio button answer. Is there a way to ...
0 votes
1 answer
116 views
valid regular regular expression string
Hi I have a regular expression which is strated failing now. not sure what is stopping. Regex regex = new Regex(@"^(([a-zA-Z]:)|(\\{2}\w+\\[\w- ]+[$])|(\\{2}\w+))(\\[\w-. ]*)*(.xml|.XML)$"); if (!...
-1 votes
1 answer
970 views
Regex to validate date format MM/DD/YY including leap year
I am looking for a regular expression to validate date format mm/dd/yy (including leap year) as well. Date should be masked in MM/DD/YY format. Kindly help me find a solution. Thanks a lot in advance!...
1 vote
2 answers
1k views
regular expression to blacklist potentially dangerous strings
What regular expression should be used to blacklist the character sequence that would cause the following error in ASP.Net - "A potentially dangerous Request.Form value was detected from the client". (...
4 votes
1 answer
1k views
Error throws using ModelClientValidationRule in MVC 5?
I try to do the custom client side validation in MVC 5 Project. When I add the following code: public IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ...
0 votes
1 answer
280 views
Using Arrays and Validation Controls in C# ASP.NET
The part of this assignment that I'm stuck on is this: The user must enter a state abbreviation in the "State" field (which is a standard textbox). However, I'm supposed to make sure that the the ...
0 votes
2 answers
5k views
Regular expression for validating UAE numbers
I need regex which validates UAE mobile phone number like +9710501234566 or +971 (050) (123 4566) Currently I am using ^(\+971[\s]{0,1}[\-]{0,1}[\s]{0,1}|[\s]{0,1}0)(5[056]{1})[\s]{0,1}[\-]{...
1 vote
3 answers
11k views
Range Validator is not working in asp.net Minimum and Maximum Value
I have applied RangeValidator on TextBox. But it always shows me error : Invalid Range, though I have given minimum value 10 and maximum value 25. I want that user must not enter value whose length is ...
0 votes
1 answer
2k views
Tooltip not showing when hovering
A simple piece of code. I notice that when I hover over a '*', the tooltip doesn't show. Are Tooltips working in Internet Explorer 10? Code: <p>Username:<asp:TextBox ID="UsernameTextBox" ...
0 votes
1 answer
924 views
How to display messagebox for Custom Validator error message?
In my user control i am having the code as: <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <asp:CustomValidator ID="cvOrgTypeGrid" runat="server" ...
0 votes
2 answers
983 views
How to use validation dynamically?
I am using below .aspx code to validate textbox..this is working perfectly <asp:TextBox ID="tbnooflecture" runat="server" Width="113px" Height="33px"> </asp:TextBox> <asp:...
0 votes
1 answer
1k views
how to fire all validation controls from client side?
In an aspx page I have different validation controls (some required and some custom). Please guide me how to fire all validation controls of page in client side code. I am aware ValidatorEnable() ...
1 vote
1 answer
374 views
Events on Master Page event not firing with Validation Controls
I have applied some textboxes in content pages. I have applied some Validations Controls on it. What i have done so far is this, <asp:TextBox ID="txtE1" runat="server" CssClass="...
0 votes
1 answer
2k views
Hide redundant error message in ASP.Net ValidationSummary
I have a asp.net page accepting two input values – Name and Address. Both of them are required fields. I have used required field validators and validation summary. When user does not enter both the ...
1 vote
2 answers
883 views
ASP.Net web application - server side canceling Submit PostBackUrl if not(!) Page.IsValid
I have a web application, and the submit uses the PostBackUrl to display data if the form is valid. I need to use different (server side) validation groups, depending on what radiobutton is selected. ...