Click or drag to resize
KaxTabControlOnClientTabSelected Property
Gets or sets a value indicating the client-side event handler that is called after selecting a tab.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientTabSelected { get; set; }

Property Value

Type: String
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
Remarks

Use the OnClientTabSelected property to specify a JavaScript function that will be executed after a tab is selected - either by left-clicking it with a mouse or hitting enter after tabbing to that tab.

Two parameters are passed to the handler

  • sender (the client-side KaxTabControl object)
  • eventArgs with one property
    • tab - the instance of the selected tab
Examples
The following example demonstrates how to use the OnClientTabSelected property.

<script language="javascript">
function ClientTabSelectedHandler(sender, eventArgs)
{
var tabControl = sender;
var tab = eventArgs.get_tab();

alert("You have selected the " + tab.get_text() + " tab in the " + tabControl.get_id() + "tabcontrol.");
}
</script>

<kettic:KaxTabControl id="KaxTabControl1" runat="server" OnClientTabSelected="ClientTabSelectedHandler">
<Tabs>
<kettic:KaxTab Text="Personal Details"></kettic:KaxTab>
<kettic:KaxTab Text="Education"></kettic:KaxTab>
<kettic:KaxTab Text="Computing Skills"></kettic:KaxTab>
</Tabs>
</kettic:KaxTabControl>

See Also