bsp;+ prefix.length, content.length - 9);
return content;
}
UserControl GetPageSrc.ascx.cs摘要:
private void Page_Load(object sender, System.EventArgs e)
{
lbUrl.Text = Request.Form["url"];
System.Net.WebClient client = new System.Net.WebClient ();
client.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; NT 5.1; .NET CLR 1.1.4322)");
try
{
txtPageSource.Text = new System.IO.StreamReader(client.OpenRead(lbUrl.Text), System.Text.Encoding.UTF8).ReadToEnd();
}
catch(Exception ex)
{
throw ex;
}
}