Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnab-developer/partialviewaspnet
Demo with partial view and AJAX call using ASP.NET MVC
https://github.com/arnab-developer/partialviewaspnet
asp-net-mvc jquery-ajax partial-views
Last synced: about 11 hours ago
JSON representation
Demo with partial view and AJAX call using ASP.NET MVC
- Host: GitHub
- URL: https://github.com/arnab-developer/partialviewaspnet
- Owner: Arnab-Developer
- License: mit
- Created: 2013-04-05T12:58:46.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2022-09-15T05:53:40.000Z (about 2 years ago)
- Last Synced: 2023-05-25T02:55:14.872Z (over 1 year ago)
- Topics: asp-net-mvc, jquery-ajax, partial-views
- Language: C#
- Homepage:
- Size: 513 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Partial view and AJAX call
Demo with partial view and AJAX call using ASP.NET MVC.
Index action method of Product controller returns partial view.
```csharp
public ActionResult Index()
{
IList products = Repositary.GetAll();
return PartialView(products);
}
```
This Index method has been called from Home -> Index view with jQuery and placed in html.
```javascript
$(document).ready(function () {
$("#ShowProducts").click(function () {
$.get("/Product/", function (data) { // Get data through AJAX call.
$("#Products").empty();
$("#Products").html(data); // Populate with data.
});
});
});
```