Can this be done without iframe?

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

<asp:Content id="Content1" ContentPlaceHolderid="LeftCPH" runat="server">

<ul style="margin: 15; list-style-type: square">

<li><a href="Footprints.htm" target="ArticlesFrame">Footprints</a></li>

</ul>

</asp:Content>

<asp:Content id="Content2" ContentPlaceHolderid="RightCPH" runat="server">


<iframe name="ArticlesFrame" ></iframe>

</asp:Content>

The above works OK but there are a few things I don't like.

I wonder if it could be done without using iframe.

I remove somethings to make the code shorter, such as the size of the iframe
and additional li elements.

I'd like to try something other than iframe. do you have a suggestion?

Thanks
 
If I understand the question it is "can I create a dynamic page that
displays articles without an IFrame". The answer is yes, but depending on
your architecture it can be easy or difficult.

If, for example, you want to store your articles as HTML documents, with
header, you will have a more difficult time, as you cannot add a second
header in the midst of your page. For that, you have to use an IFrame, or
parse out the header every time (yuck!). Actually, with XHTML, you could
easily grab the HTML inside the body tag and paste it in a region on your
page, so it is not horrible.

If you are willing to store just HTML snippets of the article, you can
easily grab the page(s) and display them. You can also store the HTML
snippet in a database.

My guess, from reading your code, is you will have to change a few things to
get away from the iFrame, but it is not impossible.

--
Gregory A. Beamer
MCP: +I, SE, SD, DBA

*********************************************
| Think outside the box!
|
*********************************************
 
Cowboy (Gregory A. Beamer) said:
If I understand the question it is "can I create a dynamic page that
displays articles without an IFrame".
Exactly

The answer is yes, but depending on your architecture it can be easy or
difficult.

If, for example, you want to store your articles as HTML documents, with
header, you will have a more difficult time, as you cannot add a second
header in the midst of your page. For that, you have to use an IFrame, or
parse out the header every time (yuck!).

I do that for another page. I read the file and remove the header and the
body tags and copy to a div InnerHtml.

Understand that I'm working alone so if I need to do something I work with
what I know and do the best I can. Without this NG I would have quit long
ago.

Anyway, on tis page, I used iframe just to get the job done and would now
like to find a better way.


Actually, with XHTML, you could
easily grab the HTML inside the body tag and paste it in a region on your
page, so it is not horrible.

Can you give me a little suggestion as to how to go about doing this?
I'm focused on your word: "easily" :)

Thanks a lot
 
If it is fully XHTML compliant, load it into an XML document and then select
the body tag. You then get the content inside it. I don't have it in front
of me right now, but innerXML.

To load it is something like this:

Literal lit = new Literal(bodyText);
Panel1.Controls.Add(lit);

I will have to find some XML code, but getitng the body node, as there is
only one, is fairly easy. xmlDoc.SelectSingleNode() is what you want to look
at for this.

--
Gregory A. Beamer
MCP: +I, SE, SD, DBA

*********************************************
| Think outside the box!
|
*********************************************
 
I just want to thank you for the help.
I read a little about what you said and see that it will take me more
reading to do it.
I'm involved in something else now and should get to it shortly.

Thanks again
 
Back
Top