How to crawl into asp.net-dopostback get new page data

Source: Internet
Author: User
Asp.net| Data | page

In the Web 2.0 era, many Web sites using AJAX technology to achieve a better user experience the price is that the content of JavaScript search engine can not crawl, Google is also studying the technology. This article discusses the links generated by the ASP.net program, and how the crawler can crawl into the problem.

Problem: The list of data appearing on a Web site is paginated, and the previous and next pages are submitted to the background with __dopostback, such as Javascript:__dopostback (' ucinfolistmore$gridinfolist$_ctl21$ _ctl1 ', ' we don't get his absolutely linked address, and each page has the same parameters as the next page.

Analysis: We first understand what __doPostBack has done.

function __doPostBack (Eventtarget, eventargument) {
var theform;
if (Window.navigator.appName.toLowerCase (). IndexOf ("Netscape") >-1) {
Theform = document.forms["Form1"];//Note the formid here
} else {
Theform = document. form1;//and here.
}
Theform.__eventtarget.value = Eventtarget.split ("$"). Join (":");
Theform.__eventargument.value = eventargument;
Theform.submit ();
}

You see, the problem is in. __eventtarget (background-processed events) and __eventargument. This is simple, we can assign values to these two parameters, and then send post to the background. So how to specify a page, asp.net in the background is the session to save the current page information, we will be able to post when we can ensure that the same conversation on the.



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.