render aspx to string.
-
Hi , Is there any way to render an aspx page to string.I used some session variables and server controls in my page.When I render it using WebClient myClient = new WebClient(); string myPageHTML = null; byte[] requestHTML; string currentPageUrl = Request.Url.ToString(); UTF8Encoding utf8 = new UTF8Encoding(); requestHTML = myClient.DownloadData(currentPageUrl); myPageHTML = utf8.GetString(requestHTML); this code , it is reloading the page again and session is expiring.Is there anyother way to render it with perfection ? With regards...
-
Hi , Is there any way to render an aspx page to string.I used some session variables and server controls in my page.When I render it using WebClient myClient = new WebClient(); string myPageHTML = null; byte[] requestHTML; string currentPageUrl = Request.Url.ToString(); UTF8Encoding utf8 = new UTF8Encoding(); requestHTML = myClient.DownloadData(currentPageUrl); myPageHTML = utf8.GetString(requestHTML); this code , it is reloading the page again and session is expiring.Is there anyother way to render it with perfection ? With regards...
// Open the requested URL
WebRequest req = WebRequest.Create(strURL);// Get the stream from the returned web response
StreamReader stream = new StreamReader(req.GetResponse().GetResponseStream());
I know the language. I've read a book. - _Madmatt
-
Hi , Is there any way to render an aspx page to string.I used some session variables and server controls in my page.When I render it using WebClient myClient = new WebClient(); string myPageHTML = null; byte[] requestHTML; string currentPageUrl = Request.Url.ToString(); UTF8Encoding utf8 = new UTF8Encoding(); requestHTML = myClient.DownloadData(currentPageUrl); myPageHTML = utf8.GetString(requestHTML); this code , it is reloading the page again and session is expiring.Is there anyother way to render it with perfection ? With regards...