"asp." NET paging control fetches page N data javascript:__dopostback

Source: Internet
Author: User
Tags ticket

Recently crawled data in a simulated HTTP request, but the server was developed by asp.

Pagination control Code

<tr> &LT;TD align=" left"> Total &nbsp210&nbsp Records &nbsp--&nbsp &nbsp2&nbsp page &nbsp--&nbsp Total &nbsp3& nbsp page </td><td align=" right"><a id="Oraclepager1_first" 
href="javascript:__dopostback (& #39;oraclepager1$first& #39;,& #39;& #39;)"> Home </a>&nbsp;<a id="Oraclepager1_prev"href="javascript:__dopostback (& #39;oraclepager1$prev& #39;,& #39;& #39;)"> Previous Page
</a>&nbsp;<a id="Oraclepager1_next"href="javascript:__dopostback (& #39;oraclepager1$next& #39;,& #39;& #39;)"> Next </a>&nbsp;<a id="Oraclepager1_last"
href="javascript:__dopostback (& #39;oraclepager1$last& #39;,& #39;& #39;)"> Last </a><SelectName="oraclepager1$pagelist"
Onchange="javascript:settimeout (& #39; __dopostback (\& #39;oraclepager1$pagelist\& #39;,\& #39;\& #39 ;) & #39;, 0)"Id="oraclepager1_pagelist"> <option value="0">1</option> <option selected="selected"Value="1">2</option> <option value="2">3</option> </Select></td> </tr>

Click on the next page is actually called JS method

Javascript:__dopostback (oraclepager1$next&#), a. ;)

Request PostData by grasping the packet stitching

Ticket_postdata ="__eventtarget=oraclepager1%24next&__eventargument="+ Getelementvaluebyid (ticket_html,"__eventargument") +"&__lastfocus=&__viewstate="+ Getelementvaluebyid (ticket_html,"__viewstate") +"&__viewstategenerator="+ Getelementvaluebyid (ticket_html,"__viewstategenerator") +"&__VIEWSTATEENCRYPTED=&"+ Getelementvaluebyid (ticket_html,"__viewstateencrypted") +"&txtmembercardno=16881270&txtmembername=&txtstartdata=2016-12-01&txtstarttime=00%3a00%3a00 &txtEndData=2016-12-29&txtEndTime=23%3A59%3A59&txtPNR=&txtOperatorName=&txtFlight=& txtairline=&txtguestname=&txtguestcardno=&txtorderid=&ddlorderstatus=&ddlordersource=& ddlactivecode=0&txtmobile=&txtticketno=&txtkxorderid=&ddlpaytype=2&ddlordertype=0& oraclepager1%24pagelist="+count; Ticket_html= Spider. POST (main_url +"ticket/ticket/ticketorderlist.aspx? topmenuid=3&leftmenuid=306", ticket_postdata, Main_url +"ticket/ticket/ticketorderlist.aspx? topmenuid=3&leftmenuid=306", Encoding.GetEncoding ("GB2312"));

Results The server returns

Invalid postback or callback Argument. Event validation isEnabledusing<pages enableeventvalidation="true"/>inchConfiguration or <%@ Page enableeventvalidation="true"%>inchA page.
For Security purposes, thisFeature verifies that arguments to postback or callback events originate fromThe server control that originally rendered Them. If the data isValid and expected,
Use the Clientscriptmanager.registerforeventvalidation methodinchOrder to register the postback or callback data forValidation.

daddy, I can't get the second page of data i Want.

Asp. NET paging control fetches page N data javascript:__dopostback

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.