Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Can I dynamically load html page into my aspx page?

Reply
Thread Tools

Can I dynamically load html page into my aspx page?

 
 
Earl Teigrob
Guest
Posts: n/a
 
      03-03-2004
I am creating an application where I would like to give web designers the
ablity to create a static html page and dyanamically load it into my
application(exactly like loading a user control into a page). Is there an
easy way to do this or do I need to stream the html into my application and
parse unwanted header/footer info before rendering it within the application
page (as a literal control, i imagine)

Has anyone done this or seen any reference material on doing such a thing?

Thanks

Earl


 
Reply With Quote
 
 
 
 
Harry Simpson
Guest
Posts: n/a
 
      03-03-2004
check out RegisterStartupScript block function.....

RegisterStartupScript

************************

Sub InsertScriptBlock(ByVal strItem As String)

Dim jScript As New System.Text.StringBuilder

jScript.Append("<script language=""JavaScript"">")

jScript.Append("location.href=""#")

jScript.Append(strItem)

jScript.Append(""";")

jScript.Append("<" & "/script>")


Me.RegisterClientScriptBlock("Bookmark", jScript.ToString())

End Sub

"Earl Teigrob" <> wrote in message
news:...
> I am creating an application where I would like to give web designers the
> ablity to create a static html page and dyanamically load it into my
> application(exactly like loading a user control into a page). Is there an
> easy way to do this or do I need to stream the html into my application

and
> parse unwanted header/footer info before rendering it within the

application
> page (as a literal control, i imagine)
>
> Has anyone done this or seen any reference material on doing such a thing?
>
> Thanks
>
> Earl
>
>



 
Reply With Quote
 
 
 
 
Earl Teigrob
Guest
Posts: n/a
 
      03-03-2004
Harry,

Thanks for the reply, however, I would like the html page included in my
aspx page. I am not trying to create a link to the page, or redirrect the
user to the html page. I want the page to be loaded into my aspx page like a
user control can be loaded into a aspx page. The html page need to be
embeded in my aspx page.

Thanks

Earl



"Harry Simpson" <> wrote in message
news:...
> check out RegisterStartupScript block function.....
>
> RegisterStartupScript
>
> ************************
>
> Sub InsertScriptBlock(ByVal strItem As String)
>
> Dim jScript As New System.Text.StringBuilder
>
> jScript.Append("<script language=""JavaScript"">")
>
> jScript.Append("location.href=""#")
>
> jScript.Append(strItem)
>
> jScript.Append(""";")
>
> jScript.Append("<" & "/script>")
>
>
> Me.RegisterClientScriptBlock("Bookmark", jScript.ToString())
>
> End Sub
>
> "Earl Teigrob" <> wrote in message
> news:...
> > I am creating an application where I would like to give web designers

the
> > ablity to create a static html page and dyanamically load it into my
> > application(exactly like loading a user control into a page). Is there

an
> > easy way to do this or do I need to stream the html into my application

> and
> > parse unwanted header/footer info before rendering it within the

> application
> > page (as a literal control, i imagine)
> >
> > Has anyone done this or seen any reference material on doing such a

thing?
> >
> > Thanks
> >
> > Earl
> >
> >

>
>



 
Reply With Quote
 
Eric Lawrence [MSFT]
Guest
Posts: n/a
 
      03-04-2004
This is exactly how http://office.microsoft.com loads some of our content
pages. It's pretty simple-- you just Response.Write the content of the .HTM
into the body. You'd want to strip out everything but what's inside the
<BODY> element.

Alternatively, you could just use an IFRAME, but that doesn't sound like an
option for you.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.


"Earl Teigrob" <> wrote in message
news:...
> Harry,
>
> Thanks for the reply, however, I would like the html page included in my
> aspx page. I am not trying to create a link to the page, or redirrect the
> user to the html page. I want the page to be loaded into my aspx page like

a
> user control can be loaded into a aspx page. The html page need to be
> embeded in my aspx page.
>
> Thanks
>
> Earl
>
>
>
> "Harry Simpson" <> wrote in message
> news:...
> > check out RegisterStartupScript block function.....
> >
> > RegisterStartupScript
> >
> > ************************
> >
> > Sub InsertScriptBlock(ByVal strItem As String)
> >
> > Dim jScript As New System.Text.StringBuilder
> >
> > jScript.Append("<script language=""JavaScript"">")
> >
> > jScript.Append("location.href=""#")
> >
> > jScript.Append(strItem)
> >
> > jScript.Append(""";")
> >
> > jScript.Append("<" & "/script>")
> >
> >
> > Me.RegisterClientScriptBlock("Bookmark", jScript.ToString())
> >
> > End Sub
> >
> > "Earl Teigrob" <> wrote in message
> > news:...
> > > I am creating an application where I would like to give web designers

> the
> > > ablity to create a static html page and dyanamically load it into my
> > > application(exactly like loading a user control into a page). Is there

> an
> > > easy way to do this or do I need to stream the html into my

application
> > and
> > > parse unwanted header/footer info before rendering it within the

> > application
> > > page (as a literal control, i imagine)
> > >
> > > Has anyone done this or seen any reference material on doing such a

> thing?
> > >
> > > Thanks
> > >
> > > Earl
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Earl Teigrob
Guest
Posts: n/a
 
      03-04-2004
Thanks Eric.

I imagine this is almost identical to doing a screen scrape, but replacing
all relative references with absolute ones, and striping away unwanted data
and tags (for example, the form tags) . That part I think I can do without
to much problem.

Do you ( or anyone else) know of any resources/technical papers on doing
this sort of thing that may cover some (or all) the modifications that would
be required to the html stream before displaying it in the body of my aspx
page? (Im sure someone has already written the "PrepareHtmlForDisplay" class
that does the work)

(In other words, can I get spoon feed on how to do this so I don't have to
think to hard!

Earl


"Eric Lawrence [MSFT]" <> wrote in message
news:O6xI%...
> This is exactly how http://office.microsoft.com loads some of our content
> pages. It's pretty simple-- you just Response.Write the content of the

..HTM
> into the body. You'd want to strip out everything but what's inside the
> <BODY> element.
>
> Alternatively, you could just use an IFRAME, but that doesn't sound like

an
> option for you.
>
> --
> Thanks,
>
> Eric Lawrence
> Program Manager
> Assistance and Worldwide Services
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
>
> "Earl Teigrob" <> wrote in message
> news:...
> > Harry,
> >
> > Thanks for the reply, however, I would like the html page included in my
> > aspx page. I am not trying to create a link to the page, or redirrect

the
> > user to the html page. I want the page to be loaded into my aspx page

like
> a
> > user control can be loaded into a aspx page. The html page need to be
> > embeded in my aspx page.
> >
> > Thanks
> >
> > Earl
> >
> >
> >
> > "Harry Simpson" <> wrote in message
> > news:...
> > > check out RegisterStartupScript block function.....
> > >
> > > RegisterStartupScript
> > >
> > > ************************
> > >
> > > Sub InsertScriptBlock(ByVal strItem As String)
> > >
> > > Dim jScript As New System.Text.StringBuilder
> > >
> > > jScript.Append("<script language=""JavaScript"">")
> > >
> > > jScript.Append("location.href=""#")
> > >
> > > jScript.Append(strItem)
> > >
> > > jScript.Append(""";")
> > >
> > > jScript.Append("<" & "/script>")
> > >
> > >
> > > Me.RegisterClientScriptBlock("Bookmark", jScript.ToString())
> > >
> > > End Sub
> > >
> > > "Earl Teigrob" <> wrote in message
> > > news:...
> > > > I am creating an application where I would like to give web

designers
> > the
> > > > ablity to create a static html page and dyanamically load it into my
> > > > application(exactly like loading a user control into a page). Is

there
> > an
> > > > easy way to do this or do I need to stream the html into my

> application
> > > and
> > > > parse unwanted header/footer info before rendering it within the
> > > application
> > > > page (as a literal control, i imagine)
> > > >
> > > > Has anyone done this or seen any reference material on doing such a

> > thing?
> > > >
> > > > Thanks
> > > >
> > > > Earl
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Stanley
Guest
Posts: n/a
 
      03-04-2004
I do something like this but I use a WYSIWYG control to do the building of
the HTML and then store the text directly into a field in a database. You
could actually write it to a text file or whatever. Then when the page loads
it looks for the right text and simply loads the HTML by using a
LiteralControl being added to something like a PlaceHolder or Panel.

PlaceHolder.Controls.Add(New LiteralControl(myTextPulledFromDatabase))

-Stanley

"Earl Teigrob" <> wrote in message
news:...
> I am creating an application where I would like to give web designers the
> ablity to create a static html page and dyanamically load it into my
> application(exactly like loading a user control into a page). Is there an
> easy way to do this or do I need to stream the html into my application

and
> parse unwanted header/footer info before rendering it within the

application
> page (as a literal control, i imagine)
>
> Has anyone done this or seen any reference material on doing such a thing?
>
> Thanks
>
> Earl
>
>



 
Reply With Quote
 
wadewalker25 wadewalker25 is offline
Junior Member
Join Date: Sep 2007
Posts: 1
 
      09-27-2007
I'm running into the exact scenario and was wondering how you solved this?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically add aspx snippet into a given aspx page ColdAir ASP .Net 1 02-26-2009 12:49 AM
Load HTML page into another HTML page using Javascript Duke Javascript 1 04-18-2008 12:16 PM
Inserting Page Load Times into HTML Source as a HTML Comment ste-m Javascript 1 11-01-2006 03:18 AM
Enbedding aspx page into another aspx page and post back Naga_01 Software 0 06-06-2006 05:51 AM
Re: loading a html page into a aspx page Christopher Ambler ASP .Net 5 08-28-2003 09:25 PM



Advertisments
 



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