Write to content page

Discussion in 'ASP .Net' started by Dst, May 19, 2006.

  1. Dst

    Dst Guest

    Using Visualstudio 2005, masterpage/contentpage layout.

    I have a old asp page which i need to display in a content page in a
    aspx page.

    I tried this:
    Get the webpage into a string.
    In page load do Response.Write(strPage);

    But this doesnt work, it gets written at the top of the page.

    So how can i write the page to the content part only ?

    I dont want to use a iframe for the asp page because links etc are
    followed inside the iframe,
    and i cant get the iframe to adjust to the content either.

    Anyone ?
     
    Dst, May 19, 2006
    #1
    1. Advertising

  2. You write the content into an object. The trick is to find the correct
    object. If it's text, use a Label object. You can also use a Literal control
    to hold more as well.

    It's tricky to get over the concepts learned in regular ASP. The trick
    though, is to think of placing objects throughout the page that can do
    operations and/or hold content.

    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - FrontPage

    "Dst" <> wrote in message
    news:...
    > Using Visualstudio 2005, masterpage/contentpage layout.
    >
    > I have a old asp page which i need to display in a content page in a
    > aspx page.
    >
    > I tried this:
    > Get the webpage into a string.
    > In page load do Response.Write(strPage);
    >
    > But this doesnt work, it gets written at the top of the page.
    >
    > So how can i write the page to the content part only ?
    >
    > I dont want to use a iframe for the asp page because links etc are
    > followed inside the iframe,
    > and i cant get the iframe to adjust to the content either.
    >
    > Anyone ?
    >
     
    Mark Fitzpatrick, May 20, 2006
    #2
    1. Advertising

  3. Dst

    Dst Guest

    Great, i used a <div> element, seems to work for a page.

    <div id= "News" runat="server" style ="vertical-align:top"></div>

    And in code:
    News.InnerHtml = strPage;


    Thanks
    Dst
     
    Dst, May 20, 2006
    #3
    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. J.Edwards
    Replies:
    0
    Views:
    1,700
    J.Edwards
    Jan 20, 2006
  2. hazz
    Replies:
    6
    Views:
    50,041
    SkyUCHC
    Jun 9, 2010
  3. Replies:
    0
    Views:
    758
  4. Rolf Welskes
    Replies:
    7
    Views:
    1,017
    Steven Cheng[MSFT]
    Aug 22, 2006
  5. Dave L
    Replies:
    3
    Views:
    3,369
    Göran Andersson
    Mar 4, 2010
Loading...

Share This Page