
| Visual Basic (Declaration) | |
|---|---|
Public Class WebNotificationEvent | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As WebNotificationEvent | |
| C# | |
|---|---|
public class WebNotificationEvent | |
The WebNotificationEvent object is the central notification data that contains information about an event. The object contains information such as the CaptionText, NotifyURL and so on which provided by the developers. The information provided in the object will be automatically retrieved by the WebNotification control in the client side for the end user notification display process.
WebNotification control begins its life cycle by requesting data from WebService. The GetNotifications function then execute the contained codes and add new WebNotificationEvent object to the collection when data existed. Finally, the collection is returned from the function. The collection object will then serialized back to the client as XML data and processed internally by the WebNotification control.
When the collection contains one or more WebNotificationEvent objects, the notification popup window will be displayed in the client's screen. The text, image and the caption text of the notification will be based on the data provided in the WebNotificationEvent object which passed from the server side. To learn more on this topic please refer to Understanding WebNotification Concepts.
| C# | Copy Code |
|---|---|
[WebMethod ] public WebNotificationEventCollection GetNotifications( WebNotificationEventArgs e) { WebNotificationEventCollection collection = new WebNotificationEventCollection (); WebNotificationEvent evnt = new WebNotificationEvent (); evnt.CaptionText = "Samples"; evnt.ContentText = "Hello world from WebNotification!\nCurrent time is:" + DateTime.Now.ToLongTimeString(); collection.Notifications = new WebNotificationEvent[] { evnt }; return collection; } | |
System.Object
ISNet.WebUI.WebDesktop.WebNotificationEvent
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2