| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 
 | <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
    <title>Test dotnet</title>
    <link rel="stylesheet" type="text/css" href="CSS/Test.css" />
	<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/themes/smoothness/jquery-ui.css" />
 
    <script type="text/javascript">
 
 
        jQuery(document).ready(function ($) {
 
 
            $("#bt1").click(function (e) {
                $.ajax({
                    type: "POST",
                    url: "Test.aspx/GetDate",
                    data: "{}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) {
                        alert("1");
                    },
                    complete: function (msg) {
                        alert("2");
                    },
                    error: function (msg) {
                        alert("3");
                    },
                    send: function (msg) {
                        alert("4");
                    },
                    stop: function (msg) {
                        alert("5");
                    },
                    start: function (msg) {
                        alert("6");
                    }
                });
            });
 
 
        });
		</script>
</head>
 
 
 
 
<body>
 
    <form id="formOptions" runat="server">
 
 
 
 
        <asp:Button ID="bt1" runat="server" Text="Bouton" PostBackUrl="~/Test.aspx" />
 
 
 
    </form>
 
</body> | 
Partager