我正在尝试在我的内容页面中将一些模型属性添加到我的
JavaScript中:
$(document).ready(function () { createPager(1,<%=Model.TotalPages %>); createUnprocessedPager(1,<%=Model.TotalUnprocessedPages %>); });
有谁知道这是否是设计的?你不打算将模型属性与JavaScript结合起来吗?或者这是一个错误?
这按预期工作.但是,我在<%...%>中没有任何Intellisense.实际编写代码时的标签.如果我在< script>中编写任何代码标签,然后没有Intellisense.如果我直接进入标签< / script>并输入<%Model ....%>然后热潮,我又有了Intellisense.
更新:22/10/2010
刚刚阅读Scott Guthrie’s latest blog post,看来这个功能即将推出ASP.Net MVC 3即将发布(可能还有测试版):
Note: Visual Studio Code/Markup
Intellisense and Colorization within
Razor files aren’t enabled yet with
the Beta earlier this month. You’ll
see this show up in a few weeks though
– and it will support full code
intellisense for HTML,JavaScript,CSS
and C#/VB code within Razor files.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。