Specifies the javascript function to invoke when the button is clicked.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property OnClientClick As String |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As WebButton
Dim value As String
instance.OnClientClick = value
value = instance.OnClientClick |
| C# | |
|---|
public string OnClientClick {get; set;} |
Remarks
Example
The following example shows you how to use WebButton's client side event OnClientClick to invoke JavaScript Alert and show a WebDialogBox. You need to type 'onclick' in the OnClientClick property.
| JScript | Copy Code |
|---|
<script language="javascript">
function onClick()
{
if(!IS.moz)
alert("WebButton OnClientClick Event");
var dlg = ISGetObject("WebDialogBox1");
dlg.ShowDialog();
}
</script> |
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