日期:2014-05-17  浏览次数:20465 次

如何得到http://wbmlw.zmipcam.net/Getip.asp返回的值呢?
如何得到http://wbmlw.zmipcam.net/Getip.asp返回的值呢?
------最佳解决方案--------------------

            WebClient web = new WebClient();
            string s = web.DownloadString("http://wbmlw.zmipcam.net/Getip.asp");

------其他解决方案--------------------


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
///引用命名空间
using System.IO;
using System.Net;
using System.Text;

namespace WebApplication5
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            WebClient web = new WebClient();
            string s = web.DownloadString("http://wbmlw.zmipcam.net/Getip.asp");

            Label1.Text = s;
        }
    }
}