Write to content page

D

Dst

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 ?
 
M

Mark Fitzpatrick

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
 
D

Dst

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top