DataDOMEvent.ReturnMessage Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the error message that will be returned if the data validation event is not successful.
public:
property System::String ^ ReturnMessage { System::String ^ get(); void set(System::String ^ value); };
public string ReturnMessage { get; set; }
member this.ReturnMessage : string with get, set
Public Property ReturnMessage As String
Property Value
Examples
In the following example, the ReturnMessage property of the DataDOMEventObject object is used to display a message to the user if the data validation for the XML DOM node fails:
public void qtty_OnBeforeChange(DataDOMEvent e)
{
if (e.NewValue.ToString() == "")
{
e.<span class="label">ReturnMessage</span> = "You must supply a value for this field.";
e.ReturnStatus = false;
return;
}
}
Remarks
Used in conjunction with the ReturnStatus property, the ReturnMessage property displays a message box to the user with the specified text message.