SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     $(function () {
  3.         $("#btnGet").click(function () {
  4.             $.ajax({
  5.                 type: "POST",
  6.                 url: "/Home/searchKuerzel",
  7.                 data: '{name: "' + $("#txtName").val() + '" }',
  8.                 contentType: "application/json; charset=utf-8",
  9.                 dataType: "json",
  10.                 success: function (response) {
  11.                     var personList = JSON.Parse(response);
  12.                     $("dropdownIdofyourchoice").value(personList);
  13.                     alert("Hello: " + response.Username);
  14.                 },
  15.                 failure: function (response) {
  16.                     alert(response.responseText);
  17.                 },
  18.                 error: function (response) {
  19.                     alert(response.responseText);
  20.                 }
  21.             });
  22.         });
  23.     });
  24. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top