Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IsEmpty
Message
 
À
04/03/2010 11:26:50
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01452408
Message ID:
01452552
Vues:
71
Johnny,

I tried to test what you are experiencing here in my web app and noticed the following:

I have a character field that requires a value and I entered a space in the field and attempted to save but in the rules object a null was still being passed even though I blanked out the field on the form. This means something is going on between the interface and business object (which sounds like a Trim() is in fact taking place). Either way this works for me because I do not want a space or a null. But what if I wanted to allow spaces? I think that setting the allowEmptyValue to true still wouldn't work since the null value would still (probably) be passed to the object. I would then need to investigate why this is happening. Right now I do not have the need to do so.

Test it a little to see what actually happens (if nobody else can give you an answer) and I think you will find out how this is really working.

Bob

>Hey thanks for the response Bob. I have reviewed the help information. What I don't get is what is the meaning of "Empty"? I know what NULL is...
>
>A users interpretation of Empty is if they do not see any characters, then it's Empty. I tend to agree. It appears that the MM.NET framework BLG does not interprete it this way when building rules. I just hate to have to over-ride the generated code worrying that a rule for an Empty string will not indicate the string is Empty (no visible characters).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform