How to value get value from API using jquery

             In this Articles can works with get value from API and use in JQuery Ajax. Already Seen How to get Data from Database To Web API. Now In this section will Display The Records from API.

Code


<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>test</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $.getJSON('http://localhost:50879/api/name/getname', function (data) {
                console.log(data);
                alert(data);
            })
        });
            </script>
                </head>
                <body>
                    <div></div>
                </body>
                </html>

Comments

Popular posts from this blog

Insecure cookie setting: missing Secure flag

Maximum Stored Procedure Function Trigger or View Nesting Level Exceeded (limit 32) in SQL Server

Display Line Chart Using Chart.js MVC C#