Development Tip #1: Wrap your Date Selector inside a User control
When developing web application, you will need to decide which date selector you are going to use , you may choose between the Caledar Extendar , or any other 3'rd party controls (like infragistics ,Telerik ,...).In the future , if you decided to change the date selector for some reason , you will need to go to all places in which you used the date selector and change the code to use the new date selector control !
The required changes could be :
- you will need to remove all "<%@ register " tags that reference the old control
- change the pages code behind to use the new control .
- also you may need to change the validations.
The Solution :
What I suggest here is that from the Beginning of the development , create a User Control that expose some properties like Selected Date(set , get) , and another property like IsRequired , and inside the user control , you can place any type of date selector control , then you just need to use this user control as a date selector in your web site , and when you want to change the date selector control , you just need to change the user control code .
Hope it helps
Anas Ghanem