blob: 38d6eddf66c3b3c9dcdfa3da13e8f5dc8fb9c991 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<com:TContent ID="body" >
<h1 id="190017">TCallback</h1>
<com:DocLink ClassPath="System.Web.UI.ActiveControls.TCallback" />
<p class="block-content">
<tt>TCallback</tt> provides a basic callback handler that can be invoked from the
client side by using the javascript ojbect obtained from the
<tt>ActiveControl.Javascript</tt> property.
You can set the <tt>CallbackParameter</tt> property from javascript directly on
the object returned by <tt>ActiveControl.Javascript</tt>.
Once you are ready, you can call the <tt>dispatch()<tt> method on the object to
execute the callback.
The server-side event <tt>OnCallback</tt> is raised when a callback is requested made.
</p>
<p class="block-content">
Example usage:
</p>
<com:TTextHighlighter Language="text" CssClass="source block-content" >
<com:TCallback ID="callback1" OnCallback="callback1_Requested" />
<script type="text/javascript">
function do_callback1()
{
var request = <%= $this->callback1->ActiveControl->Javascript %>;
request.dispatch();
}
</script>
<div onclick="do_callback1()">Click Me!</div>
</com:TTextHighlighter>
<com:RunBar PagePath="ActiveControls.Samples.TCallback.Home" />
<div class="last-modified">$Id$</div></com:TContent>
|