Skip to content

yysun/apprun-ssr-aspnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Make ASP.NET MVC App into SPA

This project demonstrates the virtual DOM filter for ASP.NET MVC applications.

The virtual DOM filter does the content negotiation to output HTML or the Virtual DOM. The client-side AppRun application alters the menu links and switches the application into the SPA mode.

[VirtualDom]
public ActionResult About()
{
    ViewBag.Message = "Your application description page.";
    return View();
}

Initial request returns full HTML page. screenshot

AJAX request returns the Virtual DOM as JSON. screenshot

Have fun and send pull requests.

License

MIT

Copyright (c) 2017 Yiyi Sun