Professional Web Applications Themes

loading a html page into a aspx page - ASP.NET General

Or, alternatively, use a "div" tag, runat server, and set the InnerHtml property in the load function. Christopher "John Saunders" <com> wrote in message news:phx.gbl... [/ref] to [/ref] aspx  > > One way would be to make these HTML files be user controls, then use > LoadControl to load them into your template page. > > Another way would be to use an <iframe> and set the src attribute to point > to the html page. > -- > John Saunders > Internet Engineer > com > >[/ref]...

  1. #1

    Default Re: loading a html page into a aspx page

    Or, alternatively, use a "div" tag, runat server, and set the InnerHtml
    property in the load function.

    Christopher

    "John Saunders" <com> wrote in message
    news:phx.gbl... [/ref]
    to [/ref]
    aspx 
    >
    > One way would be to make these HTML files be user controls, then use
    > LoadControl to load them into your template page.
    >
    > Another way would be to use an <iframe> and set the src attribute to point
    > to the html page.
    > --
    > John Saunders
    > Internet Engineer
    > com
    >
    >[/ref]


    Christopher Guest

  2. #2

    Default Re: loading a html page into a aspx page

    Absolutely correct, it would.

    In this case, I'd put something in my code that checked for that and
    stripped it down to whatever is inside of the body, perhaps taking some of
    the body arguments (like bgcolor and the like) and making a style for the
    div out of it. Set the appropriate properties on the div and load the
    InnerHtml and away you go.

    Your solution, with a web control, might be a better one in this case,
    however. In my solution, I'd expect that the HTML coming out of the DB is
    such that it's ready to be placed in the div.

    Christopher

    "John Saunders" <com> wrote in message
    news:phx.gbl... [/ref][/ref]
    want 
    > > aspx [/ref]
    > the [/ref][/ref]
    like [/ref]
    > point 
    > >
    > >[/ref]
    >
    >[/ref]


    Christopher Guest

  3. #3

    Default Re: loading a html page into a aspx page

    "Christopher Ambler" <net> wrote in message
    news:eJ$phx.gbl... 

    That depends on where it's coming from, of course.

    Do you know of any problem with my <iframe> solution?
    --
    John Saunders
    Internet Engineer
    com
     [/ref]
    the [/ref]
    The [/ref]
    should [/ref][/ref]
    InnerHtml [/ref]
    > want [/ref][/ref]
    the [/ref][/ref]
    into [/ref]
    > like 
    > > point 
    > >
    > >[/ref]
    >
    >[/ref]


    John Guest

  4. #4

    Default Re: loading a html page into a aspx page

    Other than the inherant security risks, no.

    Christopher

    "John Saunders" <com> wrote in message
    news:phx.gbl... [/ref]
    of [/ref]
    the [/ref]
    is 
    >
    > That depends on where it's coming from, of course.
    >
    > Do you know of any problem with my <iframe> solution?[/ref]


    Christopher Guest

  5. #5

    Default Re: loading a html page into a aspx page

    Sure, and as long as you can be sure that nobody else can sneak HTML into
    the database from which the iframe's content is retreived, you're fine.

    Christopher

    "John Saunders" <com> wrote in message
    news:%phx.gbl... 
    >
    > Ok, what security risks? I'm talking about an iframe pointing to another
    > file on the same server.
    > --
    > John Saunders
    > Internet Engineer
    > com
    >
    >[/ref]


    Christopher Guest

  6. #6

    Default Re: loading a html page into a aspx page

    "Christopher Ambler" <net> wrote in message
    news:%phx.gbl... 

    Ok, thanks, Christopher. I was worrying that I was missing something.

    Although I'm not the original poster, I may actually be implementing
    something like this fairly soon. And the database it's getting the HTML from
    is secure.
    --
    John Saunders
    Internet Engineer
    com
     
    > >
    > > Ok, what security risks? I'm talking about an iframe pointing to another
    > > file on the same server.
    > > --
    > > John Saunders
    > > Internet Engineer
    > > com
    > >
    > >[/ref]
    >
    >[/ref]


    John Guest

Similar Threads

  1. Loading part of the HTML page?
    By Whittemore in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: October 12th, 04:09 PM
  2. Replies: 0
    Last Post: June 12th, 10:47 PM
  3. Injecting image page element without calling ASPX page?
    By Christopher in forum ASP.NET General
    Replies: 2
    Last Post: August 27th, 04:15 PM
  4. Question: HTML char limit for aspx page???
    By VB in forum ASP.NET General
    Replies: 11
    Last Post: August 27th, 01:47 PM
  5. Replies: 0
    Last Post: July 4th, 09:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139