Ajax Rapid Hurricane: Developing www.99scj.com Experience (1)

Source: Internet
Author: User
Tags net
Ajax borrowed one of the idioms of Brother Plum: the rapid hurricane.
First of all, let me say a comparison of Ajax.NET and Atlas! Lest friends make the same mistakes as me in some ways, which, of course, only represents my experience and personal opinion.
1, if you are using forms validation, in an inadmissible page will appear JS namespace undefined error, this is the same for Ajax.NET or Atlas, the solution is to allow all users, and then separate within the Web.config set permissions
2, in speed, performance, stability above Atlas is slightly better than ajax.net.
3,ajax.net supports synchronous transmission of data and asynchronous transmission of data, but Atlas only supports asynchronous transfer of data, so if you want to control the flow of the JS code, Ajax.NET is better than Atlas, but Ajax.NET has a feature in asynchronous transmission, Do not allow multiple calls to the same server class at the same time, my solution is to write a different class
4,ajax.net and Atlas are able to return a DataTable from the server, but the methods received at the client are different, and here is a small example, assuming that var dt = The DataTable returned by the server
The method for Ajax.NET is:
if (dt. ROWS.LENGTH>0)
{
A.style.display= "";
A.innerhtml= "";
For (Var row=0;row{
var cur = dt. Rows[row];
a.innerhtml+= "
  • " +cur.this_ Title+ "
  • ";
    document.getElementById ("Pageindextd"). innerhtml= "";
    }
    }
    The number of rows in Ajax to get the DataTable returned by the server is dt. Rows.length, but Atlas is Dt.get_length ()
    Getting a row in Ajax.NET is Dt.rows[i], and Atlas is Dt.getitem (i)
    To get a column in a ajax.net is Dt.rows[i].title, where title is the column name, and Atlas is Dt.getitem (i). GetProperty ("title"), where title is the column name

    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.