Time Validation
i am using mask edit extender for time field textboxes .for that ,my scenario is start time should be less than end time .give me some validation expression or customvalidation samples
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Josip Juric118 reputationPosted Dec 7, 2010, 6:12 AM EST
TimeSpan tsStart;
TimeSpan tsEnd;
//tsStart you get parsing from masked textBox
tsStart= TimeSpan.Parse(maskedTextBox1.Text);
//tsEnd is time what you choose
tsEnd = new TimeSpan(20, 50, 30);
//Then using usual if statement you can check is tsStart smaller or bigger than tsEnd
if (tsStart < tsEnd)
{
}
If something isn't clear just say.