protected void BtGroup_ServerClick(object sender, EventArgs e)
{
//產業群首頁
string tempGroupData = GetHttpData("http://www.goudiannao.com/Group/index.aspx");
using (StreamWriter sw = new StreamWriter(this.Request.PhysicalApplicationPath + "Group\\Index.html", false, System.Text.Encoding.GetEncoding("utf-8")))
{
sw.Write(tempGroupData);
sw.Flush();
}
}
public string GetHttpData(string sUrl)
{
string sRslt = null;
WebResponse oWebRps = null;
WebRequest oWebRqst = WebRequest.Create(sUrl);
oWebRqst.Timeout = 50000;
try
{
oWebRps = oWebRqst.GetResponse();
}
finally
{
if (oWebRps != null)
{
StreamReader oStreamRd = new StreamReader(oWebRps.GetResponseStream(), System.Text.Encoding.GetEncoding("utf-8"));
sRslt = oStreamRd.ReadToEnd();
oStreamRd.Close();
oWebRps.Close();
}
}
return sRslt;
}
純靜態、簡單得不能再簡單,請Ctrl+C:
<html>
<title>單頁網站源碼</title>
<body>這是一個單頁網站源碼</body>
</html>
單頁網站的訂單系統,我是找,無敵文案寫作軟件V1.0,這個軟件的作者給的。有後台管理功能,客戶管理,訂單管理,發貨管理,都可以實現,你們可以去看看。