In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to understand the implementation of ASP.NET and Ajax, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
Ajax should not be a technology, but an idea, and it doesn't have much to do with ASP.NET and other Web development languages. Here we just talk about the Ajax technology currently used in ASP.NET and some other excellent frameworks to implement Ajax.
Ajax has been very popular for a while, and now it's a little old-fashioned to talk about Ajax. At present, the so-called Web2.0 website, basically does not use Ajax, just like using RSS, just like a label, affixed to it becomes 2.0. Ajax details aside, its purpose is to let users trigger some actions, the page will not all refresh, only refresh the "part of the page" to be updated, in the process of loading data, using Loading pictures to show that the data is being loaded, not only looks good, but also improves the user's access experience, there is a cool feeling.
As for the Ajax used in ASP.NET, I think most people use the Atlas framework that comes with Ajax.net / AjaxProfessional or ASP.NET 2.0. Because all of them have been used, I don't think these are very good Ajax solutions.
AjaxPro is not very convenient to use, and the page needs to be registered in Page_Load, similar to
The following is a reference clip:
Private void Page_Load (object sender, System.EventArgs e) {AjaxPro.Utility.RegisterTypeForAjax (typeof (DataAccess.MyAjax));}
And the ASPX page should contain a Runat=Server tag, so that Ajax.net will load some of the general functions used and your custom functions, if not, you can add them manually. However, in the applications I have done before, there are some problems that often occur. For example, I often find that there are js script errors in the browser status bar, and all the Ajax effects you do will fail. The solution is to re-overwrite that Ajax.dll / AjaxPro.dll. The cause of the problem is still unknown.
As for Atlas, I feel the same way about it as I feel about DataGrid. Well, this control is easy to use and convenient, but when you do some Web applications, you have to consider performance, layering and other issues. I think, in the more formal Web applications, few people use DataGrid to display some data. I suggest you try to use these controls as little as possible. In addition, the execution efficiency of Atlas is really not ideal, has been there Loading, waiting for a long time, unexpectedly what script error, sweat.
Is there any other solution? You can write some Javascript functions to implement it. However, I recommend using jQuery as the Javascript framework here, quoting an introduction to it from Baidu encyclopedia:
JQuery is another excellent Java crushing pt framework after prototype. Its purpose is-WRITE LESS,DO MORE, write less code, do more things.
It is a lightweight js library (only 21k after compression), which is inferior to other js libraries. It is compatible with CSS3 and a variety of browsers (IE 6.0, FF 1.5, Safari 2.0, Opera 9.0 +).
JQuery is a fast and concise javaScript library, which makes it easier for users to deal with HTML documents, events, animation, and provide AJAX interaction for the website.
Another big advantage of jQuery is that it is well documented, detailed in various applications, and there are many mature plug-ins to choose from.
JQuery allows the user's html page to keep the code separate from the html content, that is, instead of inserting a bunch of js into the html to invoke commands, you just need to define the id.
It seems that this introduction you will know, Ajax effect is only one of the many functions of jQuery, generally speaking, Web applications to use Ajax, must be inseparable from Javascript, and jQuery is for everyone to encapsulate some JS functions, so that you are no longer worried about the complexity of JS, everything is realized by jQuery for you.
If you look at a small example, you can see how convenient it is to use jQuery to do Ajax.
For example, if there is a Button in an ASPX or HTML page, click to trigger Ajax to load the data and display it. Click on that Button to trigger a JS function:
The following is a reference clip:
Function GetNews () {$("# News") .html ("Loading News."); $.ajax ({type: "post", url: "/ ajax.aspx?act=getnews", dataType: "html", data: "", success:function (result) {$("# News") .html (result);});}
This function will first display "Loading News...." in that SPAN, visit / Ajax.aspx this page through asynchronous calls, and tell the page what type of data you need through the passed URL parameter act=News. You can Write the data directly to the page through Ajax.aspx according to different parameters, and then return to the above JS function and present it to the page.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.