Uri urlCheck = new Uri("http://tw.yahoo.com");
System.Net.WebRequest request = System.Net.WebRequest.Create(urlCheck); 
System.Net.WebResponse response; 
try

    response = request.GetResponse(); 
    Response.Write("OK"); 

catch (Exception) 

    Response.Write("Error"); 


arrow
arrow
    全站熱搜

    Roger 發表在 痞客邦 留言(0) 人氣()