0

some data takes 2-3 seconds to load. My idea is to load the page immediately and then insert the data partially into the page. What is the best way to do this with MVC?

    public ActionResult WholeSite()
    {
        ViewBag.Message = "Your application description page.";

        return View();
    }

    public PartialViewResult PartialSite()
    {
        return PartialView();
    }

And the part of WholeSite:

    <div id="partialContent"> please Wait ... </div>


    @section scripts{
        <script>
            $(document).ready(function(){
               $("#partialContent").load('@Url.Action("PartialSite", "Home")')
            });
        </script>
    }

is this the best way? or is there a better solution in MVC (without JQUERY)?

Thanks

beari7
  • 105
  • 2
  • 15

0 Answers0