Ajax casually write

Source: Internet
Author: User

 

Step 1

Similar to onkeyup = "usernamechecker (this. Value); call a written JS Function

 

Step 2

In the JS function, execute a call similar to pagemethods. isuseravailable (username, onsucceeded );

 

Step 3

The system will automatically call functions corresponding to the server, such as isuseravailable ()

 

Step 4

In step 2, the written onsucceeded receives some data returned by the server. Automatically assign a value to this JS function, for example
Result…… in function onsucceeded (result, usercontext, methodname ...... The value is automatically assigned.

 

Step 5

OK. After obtaining the return value, you can use it.
If (result = true )............

Reference: http://weblogs.asp.net/traviscollins/archive/2008/02/12/check-username-availability-with-asp-net-ajax.aspx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.