Appointment Rebooking Asp.Net

I have a .aspx page(vb) that allows someone to book an appointment.  It also has a rebooking option.

This works fine but I want to now make sure that an appointment cannot be rebooked at a date past the next scheduled appointment.


2 Appointments

12 March
20 April

When I rebook the 12 March appointment I don't want to allow the new appointment to be after the next appointment on 20th April

Suggestions on the best way to do this?
Who is Participating?
I would include this data in the original query that display the current appointment and check for it at the UI level and when saving the data.

For example, when the page loads, I would store the next appointment date as some hidden value or fixed field and use that to filter any UI elements to restrict the user from selecting a date past that. If you use a calendar, you can disable any dates past that specific date.

When the end-user saves the value, I would recommend checking again that the date is not past the existing appointment dates.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.