我可以通过服务器端 (ASP.Net) 上的 DLR 调用 JScript 函数或访问 JScript 对象吗?
有没有办法通过服务器端(ASP.Net)上的 DLR 调用 JScript 函数或访问 JScript 对象?
这个问题的根源在于,DLR 存在一种从 Silverlight 应用程序中调用 JScript 的方法。 - Hejlsberg 先生通过 DLR 和 JavaScript-Binder 此处在 pdc '08 上展示了它。我没有找到有关 ASP.Net 中该功能的任何具体信息;我什至读到该活页夹已被微软放弃。 - 所以我希望能在这里得到一些信息。
Is there a way to call JScript functions or access JScript objects via DLR on the server side (ASP.Net)?
This question is driven by the fact that there existed a way to call JScript from within Silverlight apps by the DLR. - Mr. Hejlsberg showed it on pdc '08 via DLR and the JavaScript-Binder here. I didn't find any concrete information on that feature being present for ASP.Net; I even read that the binder was abandoned by Microsoft. - So I hope to get some information here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你可以创建 JavaScript 函数并在服务器端注册它们,你可以访问这些脚本,但是(如果我说的是你已经知道的事情,请原谅我,但以防万一你不知道......)你可以'让浏览器在您需要时通过服务器调用脚本(至少,以正常方式)。发出请求,发送响应,仅此而已。浏览器和服务器之间没有逻辑上持续的连接,如果您想要的话,这是不可能的。也许您可能想提供一个简单的示例,以便我们可以提供进一步的帮助。
You CAN create JavaScript functions and register them on the server side, you CAN access those scripts, but (forgive me if I'm stating something that you already know, but just in case you don't know...) you CAN'T make the browser call the scripts whenever you want via the server (well, at least, with normal ways). A request is made, and a response is sent, and that's it. There is no logical ongoing connection between the browser and the server, and that's not possible, if that's what you wanted. Perhaps you may want to provide a simple example so we can help further.
请参阅此处:http://aspnet.codeplex.com/wikipage? title=Dynamic%20Language%20Support&referringTitle=Home,但有,但没有明确的路线图。
See here: http://aspnet.codeplex.com/wikipage?title=Dynamic%20Language%20Support&referringTitle=Home, but there is, however no clear roadmap.