@using Models.Model
@model Models.Model.SocialMedia
$(function () {
$('#Button_Click').on('click', function () {
/*var media = $(".action-post").val();*/
$.ajax({
type: "POST",
url: '@Url.Action("Index")',
datatype: "json",
data: {SocialMedia},
success: function (data) {
$(".downlines").html(data.MediaList);
$(".txt.post").html(data.FullName);
$(".departmen.post").html(data.Departmen);
$(".article").html(data.Message);
/* $('.downlines').html(data);*/
}, error: function (data) {
alert("hatalııı");
}
});
});
});
This is my javascript code.Above is my model.In order to send data from data to httppost, I need to write the model to the data.I wrote the name of my model directly, but it did not accept. Where is my mistake?