Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ WebSpa Public

A simple build for .Net Core Mvc that provides faster page transitions

License

Notifications You must be signed in to change notification settings

mzuvin/WebSpa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

6 Commits

Repository files navigation

#WebSpa

A simple build for .Net Core Mvc that provides faster page transitions

demo

demo link

How to use

Add PartialAjax attribute to your Actions

[PartialAjax]
public IActionResult Index()
{
 TestModel testModel = new TestModel();
 testModel.Message = "Hello";
 ViewData["Title"] = "Home";
 return View(testModel);
}

Create a Partial View with the same name as the View you created by prefixing it with a "_" sign.

.
├── Views
├── Home 
│ ├── Index.cshtml 
│ ├── _Index.cshtml 
│ ├── Privacy.cshtml 
│ ├── _Privacy.cshtml 
│ └── ...
└── ...

Example Views

Index.cshtml

@model TestModel
@{
 Html.RenderPartial("_Index", Model);
}

_Index.cshtml

@model TestModel
<div class="text-center">
 <h1 class="display-4">@Model.Message</h1>
 <p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>

About

A simple build for .Net Core Mvc that provides faster page transitions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /