Link to home
Start Free TrialLog in
Avatar of jayv21
jayv21

asked on

How to write HTML out to aspx page from C#

I'm trying to write some HTML out to the screen stored in a variable, I don't want to write the literal value I want to generate the page based on the HTML.  PageData is the variable that contains the HTML.  How would I write this out to the ASPX page and generate the HTML?  Thanks for any help.




public partial class PrintPreview : CommonPage
{
   public PrintPreview()
   {
        string Debug = "";
        string PageData = "";
        string htmlCode = Request.QueryString.Get("HTML");
     
        try
        {

            string[] results = BAL.processReprints(htmlCode);
            PageData = results[0].ToString();
           
        }
        catch (Exception ex)
        {
            Logging.LogEntry(ex.Message);
           
        }
    }
}

Avatar of Expert1701
Expert1701

You can write raw HTML out to your ASPX page by using Response.Write.
ASKER CERTIFIED SOLUTION
Avatar of hamidovt
hamidovt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jayv21

ASKER

Thanks