ClientActivationFunction Property
Gets or sets the name of a client-side function that determines if the control can be activated. Read/write.
Usage
ASP.NET markup: | <speech:RecordSound ClientActivationFunction="..." /> |
Get value: | String = RecordSound.ClientActivationFunction; |
Set value: | RecordSound.ClientActivationFunction = String; |
Data type: | String |
Required: | No; Default: True |
Remarks
The value of the ClientActivationFunction property is the name of a custom client-side script function, without parameters or parentheses. The client-side dialog manager calls this function, using the following syntax, passing parameters that contain information about the current state of the user's interaction with the client browser. The script function may use this information, and any other available data, to activate or deactivate the RecordSound control as appropriate.
The script block that contains this function should be placed before the control that calls the function. For more information, see "Placement of Script Blocks" in Authoring Notes.
Syntax
bool FunctionName ( object source )
{
// Client-side code referenced by RecordSound.ClientActivationFunction
}
Parameters
- source
The client-side RecordSound object being tested for activation.
Return Value
A variable of type Boolean with a value of True if the control should be activated, or False if the control should be deactivated.
Example
<form id="Form1" method="post" runat="server">
...
<script>
function RecordOrNot( objRS ) {
return (siRecordedFile.IsEmpty() == false);
}
</script>
<speech:SemanticMap runat="server">
<speech:SemanticItem ID="siRecordedFile" runat="server" />
</speech:SemanticMap>
<speech:RecordSound
Beep="True"
AutoPostBack="True"
EndSilence=500
StopOnDtmf=DtmfSquare
ClientActivationFunction="RecordOrNot"
SavePartialRecord="True"
SemanticItem="siRecordedFile"
PlaybackUrlBase="http://www.cpandl.com/playback/"
SavePath="d:\vdirs\playback"
runat="server">
<Prompt Bargein="false"
InlinePrompt="Please leave your message after the beep and
press the pound sign when you are done.">
</Prompt>
</speech:RecordSound>
...
</form>
See Also
RecordSound Class | RecordSound Constructor | RecordSound Members | RecordSound Properties | RecordSound Methods | RecordSound Events | RecordSound Remarks