ASP.NET Page /Admin/Test2.aspx (C#)
Uses Code Behind Page Page /Admin/Test2.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="true" Inherits="QuiznetOnline.Web.UI.Admin._DEMO" Codebehind="Test2.aspx.cs"%>  
2:   
3: <script type="text/javascript" src="jquery.js"></script>  
4:   
5: <script type="text/javascript">  
6:   
7:     function Encode() {  
8:   
9:         $(document).ready(function () {  
10:             alert('started')  
11:   
12:             $.ajax  
13:             ({  
14:                 type: "POST",  
15:                 contentType: "application/json; charset=utf-8",  
16:                 url: "/WebServices/Tools.asmx/StringEncode",  
17:                 data: "{str:'<Hello>'}",  
18:                 dataType: "json",  
19:                 success: function (response) {  
20:                     alert('success');  
21:                 },  
22:                 failure: function (msg) {  
23:                     alert(msg);  
24:                 }  
25:             });  
26:         });  
27:         alert('finished')  
28:     }  
29: </script>  
30:   
31: <html xmlns="http://www.w3.org/1999/xhtml" >  
32: <head id="Head1" runat="server">  
33:     <title>Admin - Approve questions</title>  
34: </head>  
35: <body>  
36:     <form id="form1" runat="server">  
37:   
38:   
39:     <input type="button" name="cmdEncode$cmdEncode" value="Encode" onclick="Encode();" id="cmdEncode" />  
40:     </form>  
41: </body>  
42: </html>

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.