Home > Net >  .net c # asynchronous execution ping return results don't correspond with the IP and how to sol
.net c # asynchronous execution ping return results don't correspond with the IP and how to sol

Time:04-15

Protected void GridView1_DataBound (object sender, EventArgs e)
{

For (int I=0; I & lt; GridView1. Rows. Count; I++)
{
Ping p1=new Ping ();
P1. PingCompleted +=new PingCompletedEventHandler (enclosing PingCompletedCallBack);
P1. SendAsync (GridView1. Rows [I] Cells [3]. The Text. The ToString (), 1000, 32).

}
}
Private void PingCompletedCallBack (object sender, PingCompletedEventArgs e)
{

PingReply reply="e.R eply.
Response. Write (reply. Status);

}

GridView1 bound data, from the table take the value of the IP are listed in the loop, execute asynchronous ping, but the results returned to ping the IP address is not corresponding to each step, what method can solve? To see someone that can use the e.u serstate, but I don't know how to use... The question has bothered me for a week, ask tall person to give directions!!!!!!!!!!!!!!!
  • Related