Bashar Kokash' Blog

.Net Framework, windows and web development.

This site

Resources

Friends

Sponsors

  • MaximumASP
  • Packet Sniffer
    Custom Essay
  • halloween mask

April 2008 - Posts

Detecting internet connection state using javascript

A lot of people over the net asks the same question :

How to find out if the Internet connection is connected or disconnected in ASP.NET?

 But ASP.NET runs on the server, so if the user's Internet connection is disconnected,then the browser will not be able to connect to the web server to run ASP.NET code, that's why I thought this code should be client-side, so I digGed a little in java-script and here is an example of what I found out:

 <script language="javascript">function CheckOnline()
{

if(navigator.onLine)
      alert("You're online");
else
      alert("You're offline");
}

</script>

<body onload ="CheckOnline()">

</body>

I test it on Internet Explorer 7 and Mozilla and it worked well.

Posted: Apr 12 2008, 02:21 PM by BasharKokash | with no comments
Filed under:
ASP.NET Dynamic Data Preview Update released

Hi,

 A new update for the ASP.NET Dynamic Data Preview just released, it provide more new features and additional support to the existed data controls such as GridView, ListView, FormView, DetailsView...

 To download it and give it a try here.

 

Resources:
Dynamic Data Samples.
ScottGu's Blog

The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.