I am using textbox (txtFileType) with event OnFocus=("this.blur();"), so I can't use textchanged event for this textbox, I have written a vb code to calculate my FileNumber using stored procedures based on the value of textbox (txtFileType).
我正在使用带有事件OnFocus =(“this.blur();”)的文本框(txtFileType),所以我不能对此文本框使用textchanged事件,我已经编写了一个vb代码来使用基于存储过程的存储过程来计算我的FileNumber textbox的值(txtFileType)。
Can I call this vb code from javascript which can be used in clientside.. please help with an example.. or any other possible ways..
我可以从javascript调用这个vb代码,可以在客户端使用..请帮助一个例子..或任何其他可能的方式..
2 个解决方案
#1
i assume your vb code is going to reside on the server side. you can expose the server side method as a service and invoke it using javascript. For ajax purpose you can probably look at this tutorial from Microsoft itself.
我假设您的vb代码将驻留在服务器端。您可以将服务器端方法公开为服务,并使用javascript调用它。出于ajax的目的,您可以从Microsoft本身查看本教程。
#2
Sounds like you need to call a web service method through your page to process. Try this example and let me know if it helps.
听起来您需要通过页面调用Web服务方法来处理。试试这个例子,让我知道它是否有帮助。
#1
i assume your vb code is going to reside on the server side. you can expose the server side method as a service and invoke it using javascript. For ajax purpose you can probably look at this tutorial from Microsoft itself.
我假设您的vb代码将驻留在服务器端。您可以将服务器端方法公开为服务,并使用javascript调用它。出于ajax的目的,您可以从Microsoft本身查看本教程。
#2
Sounds like you need to call a web service method through your page to process. Try this example and let me know if it helps.
听起来您需要通过页面调用Web服务方法来处理。试试这个例子,让我知道它是否有帮助。