0 Replies - 4799 Views - Last Post: 23 April 2013 - 09:37 PM

#1 johnmcmil  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-April 13

if statement help

Posted 23 April 2013 - 09:37 PM

Can you do something like this? If so, how?
if ("URL LINK" == System.Net.HttpStatusCode.NotFound)
{
    MessageBox.Show("NO")
}
else
{
    MessageBox.Show("OK")
    Process.Start("URL LINK")
}


But if the webpage gives the 404 I don't wan't the webpage to open at all, just return the message box no. And if there's no 404, then it can open the webpage.
Is This A Good Question/Topic? 0
  • +

Page 1 of 1