Start with Ajax.NET
Related Tags:
Microsoft.NET Framework 2.0
Ajax.net Professional Profile:
Ajax.net is a response. NET platform services-Ajax Framework (Microsoft has a framework called Atlas, on the Atlas see Dflying Chen's Blog), which allow you to call the client. NET, you can also access to the relevant source code. However, its license agreement is not very clear.
Contact original author: http://weblogs.asp.net/mschwarz/contact.aspx
Original author of Blog: http://weblogs.asp.net/mschwarz/
If you have questions or find a Bug please visit: Google group Ajax.NET Professional.
Original author of the e-mail address:
Michael Schwarz
Meisenweg 2
90547 Stein, Germany
Download Ajax.NET Pro (5.11.4.2), including against. NET1.1 (C #) and. NET2.0 (C # / VB.NET).
Let us start from here it: Ajax.NET novice guidelines
First, add the AjaxPro.2.dll references (for the. NET Framework 1.1 Add AjaxPro.dll)
Then, add the web.config configuration file, add the following lines:
A
<? Xml version = "1.0" encoding = "utf-8?"> 2
<configuration> 3
<appSettings/> 4
<connectionStrings/> 5
<system.web> 6
<httpHandlers> 7
<add Verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> 8
</ HttpHandlers> 9
[
] 10
</ System.web> 11
</ Configuration> 12

Mean that all the ajaxpro / *. ashx request by Ajax.PageHandlerFactory handle, and not by default System.Web.UI.PageHandlerFactory processing plant to deal with them.
Now we write a AjaxMethod server, the server he and the general methods only difference is that he must add a method of the above [AjaxPro.AjaxMethod], the code below:
A
[AjaxPro.AjaxMethod] 2
Public int AddTwo (int firstInt, int secondInt) 3


( 4
SecondInt return firstInt +; 5
) To use Javascript on the client call. NET, you must also be registered these methods:
A
Protected void Page_Load (object sender, EventArgs e) 2


( 3
AjaxPro.Utility.RegisterTypeForAjax (typeof (_Default)); 4
) Finally, we write the script called client server approach (code detailed in the Notes).
Following is the outlook Default.aspx code:
A
<% @ Page Language = "C #" AutoEventWireup = "true" CodeFile = "Default.aspx.cs" Inherits = "_Default"%> 2

3
<DOCTYPE html PUBLIC "- / / w3c / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4
<html Xmlns="http://www.w3.org/1999/xhtml"> 5
<head Id="Head1" runat="server"> 6
<title> Untitled Page </ title> 7
</ Head> 8
<body> 9
<form Id="form1" runat="server"> 10
<div> 11
<input Id="Text1" type="text" onchange="add()"/> 12
+ 13
<input Id="Text2" type="text" onchange="add()"/> 14
= 15
<span Id="result"> </ span> 16
</ Div> 17
</ Form> 18

19
<script Type="text/javascript"> 20
Function add () 21


( 22
Var a = document.getElementById ( 'Text1'). Value; 23
Var b = document.getElementById ( 'Text2'). Value; 24
Var a1 = parseInt (a); 25
Var b1 = parseInt (b); 26

27
_Default.AddTwo (A1, b1, getAdd_callback); / / asynchronous server-side method call 28
) 29

30
Function getAdd_callback (rel) 31


( 32
/ / MyDemo._Default.GetServerTime () came from the server by the data object, to write. Value 33
Document.getElementById ( "result"). InnerHTML = rel.value; 34
) 35

36
</ Script> 37

38
</ Body> 39
</ Html> 40

Following is a complete Background Default.aspx.cs code:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using System.Web.UI.HtmlControls; 
Public partial class _Default: System.Web.UI.Page 

(
[AjaxPro.AjaxMethod]
Public int AddTwo (int firstInt, int secondInt) 

(
SecondInt return firstInt +;
) 
Protected void Page_Load (object sender, EventArgs e) 

(
AjaxPro.Utility.RegisterTypeForAjax (typeof (_Default));
)
) 
- Flash Video Guide: Start and interface
- United States blog start selling China has yet to launch the service
- Ajax resources or Ajax Resources
- Ajax --
- Start from scratch learning FLASH 3D Guide
- AJAX, tasteless!
- Flash MX 2004 to reduce the start-up
- Wrote the AJAX
- Start with Ajax.NET
- About''Ajax '
- What is AJAX
- Ajax Quick Start agreement is based on http
- CSS Practical Guide: start from the basis of (a)
- The Ajax
- AJAX
- AJAX Technology
- AJAX Essentials
- AJaX for weblogs
- Complete a thorough understanding CSS box model (DIV layout Quick Start)
- AJAX browser
- What is Ajax?
- Ajax bad
- Imitation WINDOWS XP Start menu navigation
- Web site before the start should consider the important issues
- CSS Practical Guide: start from the basis (3)
- Acquaint AJAX
- Ajax is not mysterious
- How to use Javascript to stop or start AJAX Timer
- Making Web css start of a pattern
- Javascript DOM model and the use of CSS to achieve folded and start menu
- Thinking in AJAX (1) - AJAX
- CSS Practical Guide: start from the basis (2)
- About AJAX
- Flash Media initial start Flash Media Server
- Pragmatic Ajax
- Ajax Profile
- CSS Quick Start
- Based on AJAX technology WebGis systems practice (1. Quick Start)
- Chinese version of the Flash 8 Video Guide (17) effects - start




