asp.Net静的生成時のフィルタviewstateの実現方法
1332 ワード
public static string GetSourceTextByUrl(string url)
{
WebRequest request = WebRequest.Create(url);
request.Timeout = 200000;//20
WebResponse response = request.GetResponse();
Stream resStream = response.GetResponseStream();
StreamReader sr = new StreamReader(resStream);
string tempstr = sr.ReadToEnd();
Regex r1 = new Regex("", RegexOptions.IgnoreCase);
Regex r2 = new Regex("", RegexOptions.IgnoreCase);
Regex r3 = new Regex("", RegexOptions.IgnoreCase);
// ");
tempstr = r1.Replace(tempstr, "");
tempstr = r2.Replace(tempstr, "");
tempstr = r3.Replace(tempstr, "");
tempstr = r4.Replace(tempstr, "");
tempstr = r5.Replace(tempstr, "");
return tempstr;
}