This example shows how to dynamically set and update the content of the RadNotification control via a WebService. This is an alternative of the callback mechanism.
The path to the web service and the name of the service method are specified in the WebMethodPath and WebMethodName properties.
In order to use the integrated support, the web service should have the following signature:
[ScriptService]
public
class
WebServiceName : WebService
{
[WebMethod]
public
string
WebServiceMethodName(
object
context)
{
// We cannot use a dictionary as a parameter,
because it
is
only supported by script services.
// The context object should be cast to a dictionary at runtime.
IDictionary<
string
,
object
> contextDictionary = (IDictionary<
string
,
object
>) context;
//...
}
}
You can combine the VisibleOnPageLoad property and the WebService functionality of RadNotification to make a notification message visible when the page first loads and set its content using a WebService.
Notice the notification in the bottom right corner of the browser window. You can obtain the up-to-date information in the same manner by pressing the arrow button.