Hi
I have shown ping status as shown from view. but cannot count that status field; as it is not stored in table.column.
@Html.DisplayNameFor(model => model.SERVER_IP)
@foreach (var item in Model)
{
@Html.DisplayFor(modelItem => item.SERVER_IP)
@{
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"]
@ ARUN SAHANI
Anoop Kumar SharmaPosted Apr 30, 2019, 11:36 AM