-1

I want to navigate to php or xml files those are in server, but for that I need to have Internet access.

How can I see if there's a connection available and active using C#?

Deepika
  • 384
  • 1
  • 11
  • Just try to download. Another option is to send HTTP `HEAD` request. – khachik May 25 '11 at 10:46
  • possible duplicate of [C# - How do I check for a network connection](http://stackoverflow.com/questions/520347/c-how-do-i-check-for-a-network-connection) – Cody Gray May 25 '11 at 10:48
  • 2
    Now, **[that duplicate shouldn't have been too hard to find](http://i.stack.imgur.com/e25gD.png)**. – Cody Gray May 25 '11 at 10:50
  • Hello, in that they are asking how to check internet connection. My question is how to handle if any network breakdowns occurs – Deepika May 25 '11 at 10:54

1 Answers1

0

Try connecting to the resource in question. If you can't then there's no connection "available and active"

Without more detail in your question, it's difficult to provide more info.

spender
  • 112,247
  • 30
  • 221
  • 334
  • is there any options like event handlers to handle this – Deepika May 25 '11 at 10:47
  • @deepika, of course there are, but you can't be helped unless you post more info about how you are wanting to connect. – spender May 25 '11 at 10:48
  • I'm using c# utility that takes care of data synchronization of online and online process. In this utility when i'm sending offline data to online it requires internet connection. So that time i need this – Deepika May 25 '11 at 10:52