locked
textbox format 10:00 very urgent. RRS feed

  • Question

  • Hi All

    I want the user to enter integers only at this format only 00:00 till 99:00. How can vaidate this in c#.net.

    Thanks & Regards

    Rakesh Kumar

    Friday, November 23, 2012 11:53 AM

Answers

  • How about checking for a regular expression match with pattern @"[0-9][0-9]:[0-9][0-9]" (and not a match to @"99:[1-9][1-9]" because of the unexpected upper limit shape) in the validation event?

    "Premature optimization is the root of all evil." - Knuth

    If I provoked thought, please click the green arrow

    If I provoked Aha! please click Propose as Answer

    • Proposed as answer by Norkk Friday, November 23, 2012 12:43 PM
    • Marked as answer by rakeshdonthi Monday, November 26, 2012 11:30 AM
    Friday, November 23, 2012 12:04 PM