Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(function () {
- $("#btnGet").click(function () {
- $.ajax({
- type: "POST",
- url: "/Home/searchKuerzel",
- data: '{name: "' + $("#txtName").val() + '" }',
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: function (response) {
- var personList = JSON.Parse(response);
- $("dropdownIdofyourchoice").value(personList);
- alert("Hello: " + response.Username);
- },
- failure: function (response) {
- alert(response.responseText);
- },
- error: function (response) {
- alert(response.responseText);
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement