How to embed (show) an entire html page in asp.net

Discussion in 'ASP .Net' started by Alex, Oct 28, 2004.

  1. Alex

    Alex Guest

    Hi. I need to insert an entire html page from a string variable into a
    asp.net page. I thought that literals should work, but still I need to
    remove some tags like html, body, etc.

    Thanks,

    Alejandro Penate-Diaz.
     
    Alex, Oct 28, 2004
    #1
    1. Advertising

  2. iframe

    Eliyahu

    "Alex" <> wrote in message
    news:...
    > Hi. I need to insert an entire html page from a string variable into a
    > asp.net page. I thought that literals should work, but still I need to
    > remove some tags like html, body, etc.
    >
    > Thanks,
    >
    > Alejandro Penate-Diaz.
    >
    >
     
    Eliyahu Goldin, Oct 28, 2004
    #2
    1. Advertising

  3. Alex

    Saravana Guest

    You can use response.write "<full html>"

    --
    Saravana
    http://dotnetjunkies.com/WebLog/saravana/
    www.ExtremeExperts.com


    "Alex" <> wrote in message
    news:...
    > Hi. I need to insert an entire html page from a string variable into a
    > asp.net page. I thought that literals should work, but still I need to
    > remove some tags like html, body, etc.
    >
    > Thanks,
    >
    > Alejandro Penate-Diaz.
    >
    >
     
    Saravana, Oct 28, 2004
    #3
  4. Alex

    Hans Kesting Guest

    Alex wrote:
    > Hi. I need to insert an entire html page from a string variable into a
    > asp.net page. I thought that literals should work, but still I need to
    > remove some tags like html, body, etc.
    >
    > Thanks,
    >
    > Alejandro Penate-Diaz.


    Remove all html-markup from the aspx file (leave just the <%@Page> line).
    Then use an override of the Render method to write out that string as the
    complete html content of your page.

    Hans Kesting
     
    Hans Kesting, Oct 28, 2004
    #4
  5. Alex

    Alex Guest

    Thanks! I did this:
    protected override void Render(HtmlTextWriter writer)

    {

    writer.Write(Session["body"].ToString());

    }

    and worked just perfect.

    Alejandro.



    "Hans Kesting" <> wrote in message
    news:%23W$...
    > Alex wrote:
    > > Hi. I need to insert an entire html page from a string variable into a
    > > asp.net page. I thought that literals should work, but still I need to
    > > remove some tags like html, body, etc.
    > >
    > > Thanks,
    > >
    > > Alejandro Penate-Diaz.

    >
    > Remove all html-markup from the aspx file (leave just the <%@Page> line).
    > Then use an override of the Render method to write out that string as the
    > complete html content of your page.
    >
    > Hans Kesting
    >
    >
     
    Alex, Oct 28, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Strøiman
    Replies:
    2
    Views:
    676
    Peter Strøiman
    Oct 28, 2003
  2. =?Utf-8?B?Um9ieTIyMjI=?=

    Embed ASP page in ASP.NET

    =?Utf-8?B?Um9ieTIyMjI=?=, Sep 23, 2004, in forum: ASP .Net
    Replies:
    10
    Views:
    7,897
    Steven Cheng[MSFT]
    Sep 27, 2004
  3. misiek
    Replies:
    0
    Views:
    451
    misiek
    Mar 9, 2006
  4. emorgoch
    Replies:
    6
    Views:
    394
    Mark Rae
    Dec 20, 2006
  5. Chris Lane
    Replies:
    1
    Views:
    121
    Hermit Dave
    Nov 25, 2003
Loading...

Share This Page