Click or drag to resize

MessagePop Class

Provides information regarding how to configure a client-side msgpop popup. By default the popup will have a caption area, a content area, and OK and Cancel buttons. Currently a MessagePop object is provided in the event args of the FieldConfirm event where it is used to allow the extension to configure the popup.

At a minimum a Caption and Message (or HTML) should be provided.

Inheritance Hierarchy

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class MessagePop : JsonSerializer

The MessagePop type exposes the following members.

Constructors
  NameDescription
Public methodMessagePop
Standard constructor.
Top
Properties
  NameDescription
Public propertyButton1Caption
Gets/sets the caption for Button1. Since Button1 is only shown if its caption is not null/empty and by default Button1Caption is null/empty, setting its caption non-null/empty has the effect of causing the button to be shown. Note that there is no inherent handling for Button1 so if Button1 is presented it is expected that OnButton1Click javascript is provided. Note that Button2 is also available by setting Button2Caption.
Public propertyButton2Caption
Gets/sets the caption for Button2. Since Button2 is only shown if its caption is not null/empty and by default Button2Caption is null/empty, setting its caption non-null/empty has the effect of causing the button to be shown. Note that there is no inherent handling for Button2 so if Button2 is presented it is expected that OnButton2Click javascript is provided. Note that Button1 is also available by setting Button1Caption.
Public propertyCancel
Forces the Cancel selection for the user. When this is set, the popup will not be displayed and the action associated with the Cancel button will be invoked.
Public propertyCancelCaption
Gets/sets the caption for the Cancel button.
Public propertyCaption
Gets/sets the message box caption. If no caption is provide the caption portion of the popup is hidden.
Public propertyCssClass
Gets/sets any additional CSS class(es) to be added to the message box popup.
Public propertyHTML
Gets/sets the HTML content to be injected into the content portion of the popup. You can use Message if you want a simple confirmation message (without having to worry about escaping the content for use in HTML).
Public propertyMessage
Gets/sets a simple message for the popup. The message will be escaped for HTML use. If you want a message with HTML formatting, or more complex HTML content, use HTML to provide the popup content.
Remarks
When used in a FieldConfirm event, the Message will be pre-populated with the field's Confirmation text.
Public propertyNoCancel
Suppresses the OK cancel.
Public propertyNoOK
Suppresses the OK button.
Public propertyOK
Forces the OK selection for the user. When this is set, the popup will not be displayed and the action associated with the OK button will be invoked.
Public propertyOKCaption
Gets/sets the caption for the OK button.
Public propertyOnButton1Click
Gets/sets javascript to be added to the Button1 click handler. Ignored unless Button1Caption is set to cause the button to be shown.
Public propertyOnButton2Click
Gets/sets javascript to be added to the Button2 click handler. Ignored unless Button2Caption is set to cause the button to be shown.
Public propertyOnCancelClick
Gets/sets additional javascript to be added to the Cancel button click handler. This does not replace the standard Cancel handling. By default the Cancel button closes the popup and stops any further action. Typically no additional click handling is required for the Cancel button and there is therefore, generally, no need to set this property.
Public propertyOnOKClick
Gets/sets additional javascript to be added to the OK button click handler. This does not replace the standard OK handling. By default the OK button closes the popup and proceeds with the action specified when invoked. In the case of a FieldConfirm the result is to continue with the action (e.g. posting the page). Typically no additional click handling is required for the OK button and there is therefore, generally, no need to set this property.
Top
Methods
  NameDescription
Public methodAdd(String, StringCollection)
Add a StringCollection to the object as a string array.
(Inherited from JsonSerializer.)
Public methodAdd(String, Enum)
Add an enum property to the object converting the enum value to an int.
(Inherited from JsonSerializer.)
Public methodAdd(String, Int32)
Add an int property to the object.
(Inherited from JsonSerializer.)
Public methodAdd(String, String)
Add a string property to the object.
(Inherited from JsonSerializer.)
Public methodAdd(String, String)
Add a string array property to the object.
(Inherited from JsonSerializer.)
Public methodAdd(String, Boolean, Boolean)
Add a boolean property to the object converting the bool value to javascript true/false keywords or 1/0 integers depending on the value of asOneOrZero. The default is true/false.
(Inherited from JsonSerializer.)
Public methodAddHtml
Add a block of HTML as a property of the object. Note that HTML requires special escaping including removal of CR and LF characters. Such escaping is performed by this method and the call should NOT so escape the HTML.
(Inherited from JsonSerializer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitYesNo
Sets up the Yes/No captions from resource file
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Generate the javascript expression defining the JSON object.
(Inherited from JsonSerializer.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also