473,322 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Can I dynamically load html page into my aspx page?

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
Nov 18 '05 #1
5 10042
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" <ea******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #2
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" <hs*******@nospamphgt.net> wrote in message
news:OJ*************@tk2msftngp13.phx.gbl...
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" <ea******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
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


Nov 18 '05 #3
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" <ea******@hotmail.com> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...
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" <hs*******@nospamphgt.net> wrote in message
news:OJ*************@tk2msftngp13.phx.gbl...
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" <ea******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
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



Nov 18 '05 #4
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]" <e_********@hotmail.com> wrote in message
news:O6***************@tk2msftngp13.phx.gbl...
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" <ea******@hotmail.com> wrote in message
news:uA**************@tk2msftngp13.phx.gbl...
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" <hs*******@nospamphgt.net> wrote in message
news:OJ*************@tk2msftngp13.phx.gbl...
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" <ea******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
> 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
>
>



Nov 18 '05 #5
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" <ea******@hotmail.com> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
6
by: Ken Varn | last post by:
I want to add my own custom <STYLE> section in the <HEAD> section of my ASP.NET page within a custom control. Can someone tell me how I can have my custom control add tags to the <HEAD> section of...
2
by: sj via .NET 247 | last post by:
I have a web form <%@ Page Language="vb" AutoEventWireup="false" Codebehind="test.aspx.vb" Inherits="test"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> &nbsp;...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
1
by: kanones | last post by:
Hi - I am seeing some performance degradation when I am loading a control dynamically onto a page with multiple other dynamical controls using Page.LoadControl versus dragging and dropping it...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
4
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup,...
4
daJunkCollector
by: daJunkCollector | last post by:
I am using AJAX to dynamically load content into a <div> layer. As it stands, I am loading .html's into the <div> layer and it works awesome. The problem is that when I try to replace the .html...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.