How to get this value in asp.net core code.
I have set value in Hidden Field when click li and set particular li id
this is my code
<ul class="list-group--alt">
@foreach (var category in Model)
{
@*<li id="@category.CategoryId"><a href="/blog/category/@category.UrlSlug">@category.Title</a></li>*@
<li id="@category.CategoryId"><a href="/categories">@category.Title</a></li>
}
</ul>
<script>
$(".list-group--alt li").on("click", function () {
var testObject = this.id;
var data = {};
data.FullName = storage.setItem('testObject', JSON.stringify(testObject);
$("#HiddenField").val(JSON.stringify(data));
alert(data);
});
</script>
please help me
Bc'z here redirect other page when a click categories.