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"); 

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