How to use Ajax to update RenderBody() section with VS 2012 Internet Template?

前端 未结 2 1650
忘掉有多难
忘掉有多难 2021-02-20 05:03

I\'ve looked at few examples where Ajax can be used to update divs or other elements with ids. I have not been able to find an example that uses Ajax with Razor views to help me

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-20 05:53

    In your HomeController.cs

    public PartialViewResult About()
    {
        ViewBag.Message = "Your app description page.";
    
        return PartialView();
    }
    

    In your _Layout.cshtml do not forget to import:

        
        
    

提交回复
热议问题