Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个必须在运行时生成的 javascript。那是在控制器中,我将它作为字符串获取到我的视图中。像 asp 文字控制一样,mvc 3 razor 中有什么方法吗????帮我大师
这可能有效:
<script type="text/javascript"> @Html.Raw(Model.YourJavaScriptString) </script>