开发者

Ajax and MVC (asp.net)

I need to add a collapsble panel to an MVC View. Example show , but when I add

I added the AjaxToolkit dll that I downloaded as a refrence to my project - but I still don't seem to have no Ajax support....

Hopefu开发者_运维问答lly someone can guide me.


AjaxToolkit contains extensions for classic web forms applications and is not intended to be used in ASP.NET MVC. So you can safely remove this reference from your ASP.NET MVC application and use jQuery UI.


Most ASP.NET MVC developers are using jQuery for AJAX. Here is the rough setup.

1) Partial view that returns the bit you want to refresh

2) When you need to get the data, fire a jQuery get

$.get('/Controller/Action', function(data) {
    $('.myContainer').html(data);
});

(http://api.jquery.com/jQuery.get/)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜