Answer the question
In order to leave comments, you need to log in
Why is the data not being passed to the controller?
I have this script:
<script type="text/javascript">
$(function () {
$("input:checkbox").click(function () {
$.ajax({
type: 'POST',
url: '/Project/Index/',
dataType: "html",
data: "Hello",
});
});
})
</script>
[HttpPost]
public ActionResult Index(string stat)
{
return View();
}
Answer the question
In order to leave comments, you need to log in
I haven't dealt with ASP.NET for a hundred years, but I suppose that if you write in the front-end:
then everything will work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question