Welcome to Dream.In.Code
Become an Expert!

Join 150,106 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,904 people online right now. Registration is fast and FREE... Join Now!




Comparing time - validator or what?

 
Reply to this topicStart new topic

Comparing time - validator or what?

knotbeer
3 Jul, 2008 - 07:52 AM
Post #1

New D.I.C Head
*

Joined: 21 Dec, 2007
Posts: 1


My Contributions
I'm not retarted, but I feel like it and that's why I feel this is a "beginner's" question. I'm having some issues trying to create a simple intranet appointment calendar.

Basically, a user has to select a time for the beginning of this appointment and then select the end time. I am using listboxes (one for each selection) and would like to make sure the beginning time does not begin before the ending time or vice versa. What is the best way to approach this?

I've attempted to use the CompareValidator, but it doesn't seem to work, and I don't even know if this is the right one to use.

I don't think I need to post any code since this is a conceptual/design question, but I will if it's deemed necessary. I have a couple of other features to finish up on my project, so I'll continue on them until I get something in my head for this particular solution.

I'm just looking for direction, not someone else's work. I'm using ASP.NET with C# 3.5 on Visual Studio 2008.

Thanks in advance!
User is offlineProfile CardPM
+Quote Post

branston
RE: Comparing Time - Validator Or What?
4 Jul, 2008 - 03:38 AM
Post #2

New D.I.C Head
*

Joined: 4 Jul, 2008
Posts: 2


My Contributions
I would suggest that you check these server side after a post back of the page. At present you have several list boxes to form the Date/time and these will need to be calculated before they can be compared. If you want to use a validator you may find a custom one would be easiest, then with the use of a javascript function you can compare the values held in the multiple drop downs.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 01:00AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month