Alternatives to asp.net ajax 4.0 templates

二次信任 提交于 2020-01-01 21:46:34

问题


Assuming I'm stuck with asp.net web forms (I'd love to use MVC partial views), are there any good alternatives to asp.net AJAX 4.0 client-side templates?

In other words, is there some way to specify some html, with placeholders for data properties, to which I could then bind a JSON result. Are there any good jQuery plugins to do this?

I ask because based on the results I'm seeing from Google, this library doesn't seem to be widely used—most search results are from 2008-2010. This question seems to confirm that suspicion.

EDIT

I despise answering my own question, but this link (jQuery Templates) seems to me to be the best bet. If anyone else has any input, please post.


回答1:


Definitely consider jQuery Templates. We use them quite extensively in WebForms with ScriptServices as a data provider. There is a very small learning curve.

Also check out KnockoutJS, which integrates seamlessly.




回答2:


Adam, coincidentally, I am using JQuery to retrieve some server side data calling Web Services via Ajax and binding the result on the client side. On my particular case, I am only showing data in a tabular manner, so I am using the jquery datatables plugin (which is fantastic, in my opinion; the API is well documented and easy to extend if you need to).

If you need to show data differently, I think you'll need to write quite a good amount of boilerplate javascript code.

EDIT: I just saw your link reagarding Jquery Templates and looks really cool. I didn't know it existed :) Thanks!



来源:https://stackoverflow.com/questions/7182581/alternatives-to-asp-net-ajax-4-0-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!