开发者

Loading content in ASP.NET MVC View delayed using Ajax

开发者 https://www.devze.com 2023-02-08 12:13 出处:网络
quick question :) I have an ASP.NET MVC view. I want the view to load and then do a post using ajax to load some secondary content. I know the Ajax.ActionLink methods etc. but I want the post to happ

quick question :)

I have an ASP.NET MVC view. I want the view to load and then do a post using ajax to load some secondary content. I know the Ajax.ActionLink methods etc. but I want the post to happen automatically when the page is loaded. And not开发者_JS百科 based on some user action.

What is the best way to do this?

-- Christian


If you are using jQuery just wire your ajax call to the $(document).ready() event.

0

精彩评论

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