How would I handle an Error with this piece of code.
-
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,
-
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,
Linq to Xml can be easy