Set this property to TRUE if you wish to enable server side events that depend on
postacks. Currently the event is
OnClick.
Namespace: Telerik.WebControls
Assembly: RadToolbar (in RadToolbar.dll)
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property AutoPostBack As Boolean |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As RadToolbar
Dim value As Boolean
instance.AutoPostBack = value
value = instance.AutoPostBack
|
| C# | |
|---|
public bool AutoPostBack {get; set;} |
Return Value
Default: False
Example
Here you can see how to consume server side events in code-behind.
| C# | Copy Code |
|---|
Private void InitializeComponent()
{
toolbar1.OnClick += New Telerik.WebControls.RadToolbar.OnClickDelegate(toolbar1_OnClick);
}
Private void toolbar1_OnClick(Object sender, Telerik.WebControls.RadToolbarClickEventArgs e)
{
String text = e.Button.CommandName;
If(e.Button Is RadToolbarToggleButton)
{
If(((RadToolbarToggleButton)e.Button).Toggled)
{
text += " Toggled ON.";
}
Else
{
text += " Toggled OFF.";
}
}
Else
{
text += " Clicked.";
}
label1.Text = text;
}
|
| Visual Basic | Copy Code |
|---|
Private Sub toolbar1_OnClick(ByVal sender As Object, ByVal e As Telerik.WebControls.RadToolbarClickEventArgs) Handles toolbar1.OnClick
Dim [text] As String = e.Button.CommandName
If Typeof e.Button Is RadToolbarToggleButton Then
If CType(e.Button, RadToolbarToggleButton).Toggled Then
[text] += " Toggled ON."
Else
[text] += " Toggled OFF."
End If
Else
[text] += " Clicked."
End If
label1.Text = [text]
End Sub
|
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also