<meta name="viewport" content="width=device-width" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
$("#theBtn").click(function () {
url: '@Url.RouteUrl(new{ action="GetAnswer", controller="Home"})', //I changed this url
contentType: "application/json",
success: function (jsn) {
error: function (error) {
<input type="button" id="theBtn" value="Click to start ajax" />