开发者

Mvc Using Ajax?

Which MVC version sho开发者_StackOverflowuld I download to use the Ajax functionality in my MVC application? Is it possible with MVC 1.0?

I also want to use Modal Popups in my application.

Thanks Ritz


Have a look at the NerdDinner Tutorial. The part that talks about Ajax is here: http://nerddinnerbook.s3.amazonaws.com/Part11.htm.

The NerdDinner Tutorial is written around ASP.NET MVC 1.0.

For the Modal Popups. I suggest using a jQuery plugin, like this one: http://dev.iceburg.net/jquery/jqModal/


here is example for you

function someJSFunction() {

    var request = new Sys.Net.WebRequest();
    var someID= (document.getElementById('DOMElementID').value);
    if (someID!= ""){
        var toControler = "/SomeControler/SoomeMethod/" + someID;
        request.set_url(toControler);
        request.set_httpVerb("GET");
        request.add_completed(someOtherJSFunction);
        request.invoke();
    }    
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜