服务器客户端回发 [英] Server-Client Side Postback

查看:90
本文介绍了服务器客户端回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人
我在以下提到的问题上遇到了问题.

如何通过JavaScript中的函数调用方法(用VB代码编写):
举一个简单的例子:

Default.aspx.vb中的VB代码:

Dear All
I got a problem on following issue as mention below.

How to call a method (which is written in VB code) by a function in JavaScript:
AS a Simple Example:

VB code in Default.aspx.vb:

Public Sub testcall()
        MsgBox("Done!")
End Sub





Default.aspx中的功能:

< script type ="text/javascript">
函数test(){
----->我应该在这里写什么才能称呼"testcall" !?
}





Function in Default.aspx:

<script type="text/javascript">
function test(){
-----> What should i write here in order to call "testcall" !!?
}

推荐答案



您的问题的答案在__doPostBack javascript方法中.方法签名/定义为"__doPostBack(eventTarget,eventArgument)"
在这里看看如何使用它:

1. http://www.dotnetspider.com/resources/1521-How- call-Postback-from-Javascript.aspx [ ^ ]
2. http://stackoverflow.com/questions/910485/how-to- generate-fake-postback-with-javascript [ ^ ]
3. http://stackoverflow.com/questions/1305954/asp-net-postback-with- javascript [^ ]
4. http://www.velocityreviews.com/forums/t73209-how-to-trigger-a-postback-from-javascript.html [
Hi,

answer to your question is in __doPostBack javascript method. Method signature/definition is "__doPostBack(eventTarget, eventArgument)"
Look here how to use it:

1. http://www.dotnetspider.com/resources/1521-How-call-Postback-from-Javascript.aspx[^]
2. http://stackoverflow.com/questions/910485/how-to-generate-fake-postback-with-javascript[^]
3. http://stackoverflow.com/questions/1305954/asp-net-postback-with-javascript[^]
4. http://www.velocityreviews.com/forums/t73209-how-to-trigger-a-postback-from-javascript.html[^]


使用此代码通过java调用testcall:
Use this code to call testcall by java :
<% testcall %>



希望这会有所帮助.



Hope this helps.


这篇关于服务器客户端回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆