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 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 6, 2015, 4:13 AM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 6, 2015, 4:15 AM EDT