Christian Sparre
Christian Sparre

Reputation: 965

Loading content in ASP.NET MVC View delayed using Ajax

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 based on some user action.

What is the best way to do this?

-- Christian

Upvotes: 0

Views: 759

Answers (1)

Hector Correa
Hector Correa

Reputation: 26690

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

Upvotes: 6

Related Questions