Intersoft WebDesktop Documentation
WebNotificationEvent Class
Members  Example  See Also  Send Feedback
ISNet.WebUI.WebDesktop Namespace : WebNotificationEvent Class


Glossary Item Box

Contains the information required by WebNotification control to receive new notification events, which passed from the server side.

Object Model

WebNotificationEvent Class

Syntax

Visual Basic (Declaration) 
Public Class WebNotificationEvent 
Visual Basic (Usage)Copy Code
Dim instance As WebNotificationEvent
C# 
public class WebNotificationEvent 

Remarks

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.

Example

The following example shows you how to create WebService using the GetNotifications method. You should put the codes in asmx file (for example, WebServiceNotify.asmx). To learn more please look at WebDesktop 20 Tutorial (RetrievingNotificationsFromWebService.aspx).
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;
}

Inheritance Hierarchy

System.Object
   ISNet.WebUI.WebDesktop.WebNotificationEvent

Requirements

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

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.