MVC - 如何在客户端呈现服务器端代码 [英] MVC - How to render server side code in client side

查看:92
本文介绍了MVC - 如何在客户端呈现服务器端代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我一直在讨厌渲染服务器端代码在客户端即时。


我知道页面级服务器端代码类似于<%= Something %GT; (或)<%--- Whatever --- %>将在页面加载时呈现。


但我希望在javascript函数调用中呈现它。 


我不想用ajax调用,因为我计划在网格中实现这个功能,这样会很繁琐对网格中的每个项目进行ajax调用。


任何想法如何实现这一点。



提前致谢



解决方案

发表你的问题@ http://forums.asp.net/1146.aspx/1?MVC   for MVC specific问题

Hi,

I ve been bugging my head for some time to render the server side code in the client side on the fly.

I know the page level server side codes similar to <%= Something %> (or) <% --- Whatever ---  %> will be rendered upon the page load.

But i wanted that to be rendered on a javascript function call. 

I dont want to go with ajax call as im planning to implement this functionality inside grid so that would be tedious process to make ajax calls for every item in the grid.

Any idea how this can be acheived.

Thanks in advance

解决方案

Post your question @ http://forums.asp.net/1146.aspx/1?MVC for MVC specific question


这篇关于MVC - 如何在客户端呈现服务器端代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆