Introduction:
Description:
In my previous article i have explainedjQuery Get Number of Facebook likes, Shares, Comments using asp.net. Now I will explain how to check internet connectivity of system in asp.netusing C# and VB.NET.
In my previous article i have explainedjQuery Get Number of Facebook likes, Shares, Comments using asp.net. Now I will explain how to check internet connectivity of system in asp.netusing C# and VB.NET.
We can check internet connectivity of system by downloading data of one website from server for that write code like as shown below
<html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Check Internet Connection Availability using Asp.net</title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button runat="server" ID="btnCheck" Text="Check Internet Connectivity" OnClick="btnCheck_Click" /> <asp:Label runat="server" ID="lbltxt" /> </div> </form> </body> </html> |
Now in code behind add the following namespaces
C# Code
|
After that write the following code in code behind
|
VB.NET Code
|
Demo
No comments:
Post a Comment