Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to dynamically load View Components using Jquery in Asp.Net 5 Mvc 6

$
0
0

We are doing a project on asp.net mvc 6.I have a scenario where I have to load view components on click a button in jquery.I could not find a way to do this in jquery like partial view load .

$(document).on('click', '.cssThemeContent', function () {
// Component.Invoke("Message")
var url = '@Url.Action('+$(this).attr('setting')+"Settings"+', "Themes")';
$('#divThemeSettings').load(url, {});
});

We would be grateful if you provide us the solution.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>