Intersoft WebDesktop Documentation
Properties Property
See Also  Example Send Feedback
ISNet.WebUI.WebDesktop Namespace > WebNotificationEvent Class : Properties Property


Glossary Item Box

Gets or sets the notification event.

Syntax

Visual Basic (Declaration) 
Public Property Properties As NotificationProperties
Visual Basic (Usage)Copy Code
Dim instance As WebNotificationEvent
Dim value As NotificationProperties
 
instance.Properties = value
 
value = instance.Properties
C# 
public NotificationProperties Properties {get; set;}

Remarks

WebNotification has the ability to pass custom properties along with the notification event to the client side. For instance, you may want to send the RowID along with the notification event so you can get the ID in the client side and perform further extensibility. In WebNotification, you can send custom property easily in collection-object friendly approach. WebNotification used Dictionary based type and is able to be serialized perfectly into XML Format.

The following codes snippet demonstrates how you can pass the EmailID value along with the notification event.

WebNotificationEvent evnt = new WebNotificationEvent();

evnt.CaptionText =

"Samples: Outlook 2003";
evnt.Properties["EmailID"] = emailObj.ID;

Example

The following example shows you to pass custom properties to be used in WebNotification. You need to create a WebService page in the same directory. (For instance, name it NotificationService.asmx, then it will automatically create NotificationService.cs in the App_code folder).The codes below is used GetNotifications method in WebService. To learn more please refer to 'Passing Custom Properties' in See Also section.
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();        
        evnt.Properties["CustomerId"] = "ALFKI";

        collection.Notifications = new WebNotificationEvent[] { evnt };
        return collection;
}

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.