Saturday, 3 August 2013

Check For Netconnection

   protected void Page_Load(object sender, EventArgs e)
    {
        if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() == true)
        {
            this.lblMsg.Text = "Net available";
        }
        else
        {
            this.lblMsg.Text = "Net not available";
        }
    }

No comments:

Post a Comment