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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.