arun sahani

arun sahani

  • NA
  • 379
  • 0

Count the processed column data

Apr 30 2019 1:56 AM
Hi 
I have shown ping status as shown from view. but cannot count that status field; as it is not stored in table.column.
 
<th>
@Html.DisplayNameFor(model => model.SERVER_IP)
</th>
<th>
</th>

@foreach (var item in Model)
{
<tr >
<td>
@Html.DisplayFor(modelItem => item.SERVER_IP)
</td>

<td>
@{
string myip = item.SERVER_UP;
Ping myPing = new Ping();
PingReply reply = myPing.Send(myip, 1000);
if (reply != null)
{
ViewData["ip_stat"] = reply.Status;
}
}
@ViewData["ip_stat"]
</td>
</tr>
 
@ ARUN SAHANI 

Answers (1)