Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6215687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:06:05+00:00 2026-05-24T07:06:05+00:00

As a (sorta) follow on from the following question – CustomValidator time c#.net –

  • 0

As a (sorta) follow on from the following question – CustomValidator time c#.net – I would like to know if it is possible to use the CompareValidator to validate a time in a ASP.NET textbox?

I have attempted the following

<asp:CompareValidator ID="CompareValidator2" Operator="DataTypeCheck" 
ControlToValidate="txtTime" runat="server" ErrorMessage="* Valid time is required"      
Type="Date" Display="Dynamic" ForeColor="Red"></asp:CompareValidator>

I assumed this would work since DateTime supports (obviously) both date and times but the validator continues to fail validation with valid inputs.

So, is it possible to validate time using the CompareValidator or is a RegularExpression or Custom Validator required?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:06:06+00:00Added an answer on May 24, 2026 at 7:06 am

    This looks like a duplicate post as seen here.

    The anser was from the post was.

    “This appearently cannot be done.

    For the record; I used a custom validator…”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is sort of a follow on from this question below but I
I have a question about precompiling ASP.NET web application projects from TeamCity. This is
This is follow on from this question: Format List<T> to concatenate fields . The
This is sort of a follow-up to this question . I want to know
I'm building an social application, which has follow/following concept similar to twitter. From a
As a sort of follow up to the question called Differences between MSIL and
This is sort of a follow-up to this question . If there are multiple
This question is sort of a follow-up to my original question here . Let's
I want to parse a config file sorta thing, like so: [KEY:Value] [SUBKEY:SubValue] Now
This question might belong on one of the other trilogies, but it sorta seemed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.