开发者

Calling server side function from VBScript

In my asp.net page I have a VBScript method which is doing some tasks like storing an image in the users C:\images folder.

After it performs that function, I need to call a VB.net function which is in the code behind of the same page.

Is there any way I can do that??

开发者_如何转开发

Thanks


First of all, you wont be able to do anything on the client machine's hard drive. The browser wont let you do that (security). That said, to call a method on the server, look into javascript and ajax. Since you are using vb.net, I think you should start here.


No, you can't do that. The code behind existed while the page was created on the server. When the client script runs, the code behind no longer exists.

If you want to call any code in the code behind, you have to make another request to the server so that the code behind runs to create another page.

You can use AJAX or any similar technique to make the request without having to reload the page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜