Question ASPX to HTML Conversion

mannu

New member
Joined
Apr 12, 2016
Messages
1
Programming Experience
3-5
Hi,

I am trying to convert ASPX page into HTML using request and response property in .Net C#.

Code are :
mywebReq = WebRequest.Create("URL");
mywebResp = mywebReq.GetResponse();
sr = new StreamReader(mywebResp.GetResponseStream());
strHTML = sr.ReadToEnd();
sw = File.CreateText(Server.MapPath("Test.html"));
sw.WriteLine(strHTML);
sw.Close();
System.IO.File.WriteAllText(@"C:\Test.html", strHTML.ToString());

That is url base conversion. when i am trying to convert using physical path then throwing exception.
Any one who have any idea/ or code for aspx to html conversion using regex or using mapper classes, or any other approach for the same.
please help me.
 
Back
Top Bottom