Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting mmTextBox.DisplayFormat property
Message
De
22/05/2004 05:08:30
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00905073
Message ID:
00906212
Vues:
27
>{0:d}
Thanks, now I understand.

>>"String was not recognized as a valid DateTime." warning gets fired [mmTextBox for DateTime value] left blank.

>For dates I tend to use MinDate values and check for that as empty.

Oog. Tried that, didn't work on several levels, not sure I understand.

Midnight coding:

1) A boolean "Required" interface (Behavior category) property for mmControls would be great for an easy, simple default MM style RequiredFieldValidator replacement. Setting this to the default of "False" would allow use of a regular ASP.NET RequiredFieldValidator if you needed something more fancy.

2) A separate _data_ issue is what to do with blank text, dates and numbers (bytes, boolean) types passed in a web form. Perhaps a property:

string EmptyValue - default "", can be set to "0" or whatever for numbers, "False" for boolean... and "null" to replace empty field values with System.DbNull

I considered additional: boolean EmptyIsNull - if True replace empty field values with System.DbNull, but maybe the one will do --?

The question is where to integrate something like this into the framework. The easiest place would be as a mmControl property, EmptyValue="null", but it seems like it should be a dictionary or "DefaultEmptyValues" class in the business object. (Any plans for a Schema object representing the data layer to the business object?)

(Should a particular interface be able to override this with the property set in the mmControl? Maybe a blank value on one form should be "" and null on another? Never encountered anything like that...)

BTW: Paia was my favorite town on Maui, funky, close enough to town, fun. Love that wacky health food store. Spent a great few remote days at Nu'u--camping, swimming, snorkeling, just being gone.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform