Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Format
Message
 
To
13/08/2003 11:26:22
Mindy Shingara
Central Susquehanna Intermediate Unit
Lewisburg, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00817419
Message ID:
00819896
Views:
14
>In your opinion, would it be best for me to code the formatting I need for these dates by using the references you sent me? Or, should I separate the date fields rather than stringing the date together using one textbox?

I like the idea of having just one control databound to a single datasource. Then you have the two separate aspects to deal with: input (parsing) and display (format).

As you mentioned, you could create a user control that contains three separate controls for separately entering day, month, and year. But I don't like user controls because they are awkward to inherit from (they work with the concept of containership, not inheritance).

For example, you create a user control that contains three textboxes. Then you come up with the smart idea to subclass the textbox to create a mytextbox subclass. If you want your user control to contain three mytextboxes, you can't. You have to throw it away and create a new user control that contains three mytextboxes.

If you have every tried to put anything other than a boolean or textbox in a Datagrid column then you will know the frustration.

So the bottom line is you can do something easy with a user control and don't plan on subclassing it. Or bite the bullet and create a single textbox that handles the databind parse and format events that can be easily inherited from.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform