i have to validate a time in a textbox in 12 hr and 24 hr format...for that i have two checkboxes like 12 hr and 24 hr if i checked 12 hr then that textbox should accept only 12 hr format if i checked 24 hr only 24 hr format should accept how to do this???
am sharing what i tried...
Source::
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="12time.aspx.cs" Inherits="Validators.Validators_Task._12time" %>
ControlToValidate="txtTime" ValidationExpression="^(1[0-2]|0[1-9]):[0-5][0-9]\040(AM|am|PM|pm)$">
ControlToValidate="txtTime" ValidationExpression="^([01]?[0-9]|2[0-3]):[0-5][0-9]$">
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SreenishPosted Aug 6, 2015, 8:15 AM
Rajeesh MenothPosted Aug 6, 2015, 8:13 AM