Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How would I handle an Error with this piece of code.

How would I handle an Error with this piece of code.

Scheduled Pinned Locked Moved ASP.NET
questionjsonhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    solutionsville
    wrote on last edited by
    #1

    I have a web page that opens and checks status of other locations via a web link. If I get an error where a location is not responding, what is the best way to handle this type of error. Here is the link; XPathDocument doc40 = new XPathDocument("http://10.50.6.40:8585/api/get\_status?password=f9c598aa58bff2a605495709f772775f&application=Widgetpage"); string state40 = doc40.CreateNavigator().SelectSingleNode("alwaysup-get-status-response/applications/application/state").Value; Label40.Text = state40; If the page does not respone, I want a popup that it is not responding and continue to load the page. Thanks,

    R 1 Reply Last reply
    0
    • S solutionsville

      I have a web page that opens and checks status of other locations via a web link. If I get an error where a location is not responding, what is the best way to handle this type of error. Here is the link; XPathDocument doc40 = new XPathDocument("http://10.50.6.40:8585/api/get\_status?password=f9c598aa58bff2a605495709f772775f&application=Widgetpage"); string state40 = doc40.CreateNavigator().SelectSingleNode("alwaysup-get-status-response/applications/application/state").Value; Label40.Text = state40; If the page does not respone, I want a popup that it is not responding and continue to load the page. Thanks,

      R Offline
      R Offline
      Robert_Pan
      wrote on last edited by
      #2

      Linq to Xml can be easy

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups