将 asp.net 对象转换为 javascript 对象的工具

发布于 2024-12-20 09:28:33 字数 743 浏览 3 评论 0原文

我正在开发一个项目,其中后端是使用 ASP.NET MVC 3 编写的,前端使用 javascript 来处理前端。我们使用 MVC 3 的 Json() 函数使用 JSON 将对象传递到前端。

我想知道是否有一个工具/IDE 插件可以为前端提供智能感知,以便我可以轻松地操作 javascript 中的对象。

例如:

Namespace Models.ViewModels
<DataContract()>
Public Class LinkAdmin
    Inherits Base

    Private Property LinkAdminManager As New LinkAdminManager

    <DataMember()>
    Public Property Games As New List(Of Models.ViewModels.LinkAdminGame)

End Class
End Namespace

那就太方便了

myLinkAdmin.ga

如果在 javascript 方面让我知道它实际上是 Games

。我刚刚在 javascript 方面犯了一些拼写错误,并希望将来能够避免这些错误。

差不多,我正在寻找一个可以查看 ASP.NET 对象并向 JavaScript 提供智能感知的工具。存在这样的东西吗?

谢谢!

I'm working on a project where the backend is written using ASP.NET MVC 3 and the front end uses javascript to handle the frontend. We use the Json() function of MVC 3 to pass objects to the front end using JSON.

I was wondering if there was a tool/IDE plugin that would provide intellisense for the frontend so that I can easily manipulate the objects in javascript.

For instance:

Namespace Models.ViewModels
<DataContract()>
Public Class LinkAdmin
    Inherits Base

    Private Property LinkAdminManager As New LinkAdminManager

    <DataMember()>
    Public Property Games As New List(Of Models.ViewModels.LinkAdminGame)

End Class
End Namespace

It would be uber convenient if, on the javascript side

myLinkAdmin.ga

would let me know that it was actually Games.

I've just made a bunch of typos on the javascript side and was hoping to avoid those in the future.

Pretty much, I'm looking for a tool that looks at an ASP.NET object and provides intellisense to javascript. Does something like that exist?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

辞取 2024-12-27 09:28:33

如果您使用 Jquery,那么您可以将 VSDoc 添加到您的页面并获取智能感知。也许您可以添加一个 VSDoc?

If you are using Jquery then you can add the VSDoc to your page and get intellisense. Maybe there is a VSDoc that you can add?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文