Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting mmTextBox.DisplayFormat property
Message
From
18/05/2004 15:29:02
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Setting mmTextBox.DisplayFormat property
Miscellaneous
Thread ID:
00905073
Message ID:
00905073
Views:
54
I have a web form with an optional date field.

1) I want a SQL datetime field retrieved into a mmTextBox displayed in a short format.

Setting the mmTextBox.DisplayFormat property to "d" for short date results in the field value contaning: "d".

What expression idiom do I use to set mmTextBox.DisplayFormat?

2) Also, a "String was not recognized as a valid DateTime." warning gets fired when the value is left blank. Is there an easy way to override this, or do I need to create a custom business rule?

[would be nice to be just set an "Optional" or "BlankOK" property in a WebUI control]

Tried using a custom business rule, but that didn't work.
public string ValidateHired(string hired)
{
  string message = null;
  if (hired == "")
  {
    this.ClearWarning("String was not recognized as a valid DateTime.");
  }
  return message;
}
Thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform