Output ASP.NET page to HTML

xiaoxiao2021-03-06  56

SMILNET [original]

C # code:

WebRequest MyWebrq;

WebResponse mywebresp;

StreamReader SR;

Streamwriter Sw;

Private Void Page_Load (Object Sender, Eventargs E)

{

MyWebreq = WebRequest.create (http://localhost/test.aspx);

MyWebResp = mywebreq.getResponse ();

SR = New StreamReader (MyWebResp.getResponseSstream ());

strHtml = Sr.ReadToend ();

SW = file.createtext (Server.Mappath ("Test.htm"));

SW.writeLing (strHTML);

SW.CLOSE ();

Response.writefile (Server.MAppath ("Test.htm"));

}

转载请注明原文地址:https://www.9cbs.com/read-117308.html

New Post(0)