62,266
社区成员
发帖
与我相关
我的任务
分享
<script language="javascript" type="text/javascript">
<!--
function CallServer(inputcontrol, context) {
context.innerHTML = '<IMG SRC="images/001.gif" />';
arg = inputcontrol.value;
<%= ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context")%>;
}
function ReceiveServerData(result, context) {
context.innerHTML = result;
}
//-->
</script>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button1" type="button" value="button" onclick="CallServer(TextBox1, Label1);" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
string ICallbackEventHandler.GetCallbackResult()
{
// throw new Exception("The method or operation is not implemented.");
System.Threading.Thread.Sleep(1000);
return "输入字符串:" + result;
}
void ICallbackEventHandler.RaiseCallbackEvent(string eventArgument)
{
// throw new Exception("The method or operation is not implemented.");
result = eventArgument;
}