Click or drag to resize
KaxAjaxControlAlert Method
Displays an alert message at client-side.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public void Alert(
	string message
)

Parameters

message
Type: SystemString

Return Value

Type: 
None.
Remarks

This is the easiest way to show a message, generated from the server, on the client in a message box.

Note: Special characteres are not escaped.

Examples
The following example illustrates a sample usage of the Alert method.
Alert(C#)
private void Button1_Click(object sender, System.EventArgs e)
{
if (!UserAccessAllowed(UserProfile))
{
KaxAjaxConsole1.Alert("You are not allowed to access this user control!");
}
else
{
LoadSecretControl();
}
}
Alert(VB)
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not UserAccessAllowed(UserProfile) Then
KaxAjaxConsole1.Alert("You are not allowed to access this user control!")
Else
LoadSecretControl()
End If
End Sub 'Button1_Click
See Also