We often use Ajax technology in Web development. There are also many ways to implement Ajax technology. Let's start with the first method: ASP. NET native control to implement Ajax today. ASP. NET native controls are mainly used in Ajax technology UpdatePanel and ScriptManager. The former, as the name suggests, is a container that can be used to hold content and implement partial page updates, you can directly add the content to be updated when using it. The latter is used to call some services and scripts: for example, we use JavaScript to call the WebService in this Demo. This Demo mainly contains a page, a Web service and a common data operation class (userHelper) to implement the function of checking whether the nickname exists during registration without refreshing the page. First, we need to create a Web Page (WebForm is used here). The general code is as follows: <% @ Page Language = "C #" AutoEventWireup = "true" CodeBehind = "WebForm2.aspx. cs "Inherits =" WebApplication1.WebForm2 "%> <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head runat =" server "> <title> register </title> <script type =" text/javascript "> function check () {var Name = document. getElementById ("txtName "). value; if (Name = "") {alert ("nickname cannot be blank! ");} Else {WebApplication1.WebService1. checkName (Name, callbackCheck); function callbackCheck (result) {if (result = false) {document. getElementById ("checkFont "). innerHTML = "<span> this nickname already exists! Enter again! </Span> ";}else {document. getElementById (" checkFont "). innerHTML =" <span> congratulations! This nickname can be used! </Span> ";}}}</script>