469,613 Members | 1,646 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

load external html vs 2005

Hello,

I am trying to load an external HTML page into a DIV tag with .NET 05 and I
can't figure it out. Any suggestions?

My Scenario:
- Gridview populated with list of available files
- I can get the external page to load in a new window just fine
- I would like the detail to show on the same page, below the list.
- I can't use the detail control and dynamically create the page as these
pages are compiled and stored on the server for archive purposes.
Nov 30 '06 #1
2 1347
Hi .. Try with Ajax XMLHTTP Request Browser activeX object for filling
the HTML page into the div tag.
Example :
<script language="javascript" type="text/javascript">
var xmlHttp;
function Button1_onclick() {
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(Window.XmlHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
xmlHttp.open("GET","http://www.itoncorp.com",true);
xmlHttp.onreadystatechange=doUpdate;
xmlHttp.send();
}
function doUpdate()
{
var t= document.getElementById("divid");
if (xmlHttp.readyState==4) {
t.innerHTML=xmlHttp.responseText;
}
}
</Script>
The above script get the www.itoncorp.com html page using the ajax and
then fill this page into the div named "divid". Iw works good.
But the main desedvantage to use this method's is, it just replace the
InnerHTML with the itoncorp.com HTML page, But it does't get the fill
the images and other resources

U can use IFrames .. this also act's like a webBrowser.. May be it will
be sutable for get native view for the webpage u requested..

all the best ..

On Nov 30, 8:36 am, "Jeff Allan" <bookp...@community.nospamwrote:
Hello,

I am trying to load an external HTML page into a DIV tag with .NET 05 and I
can't figure it out. Any suggestions?

My Scenario:
- Gridview populated with list of available files
- I can get the external page to load in a new window just fine
- I would like the detail to show on the same page, below the list.
- I can't use the detail control and dynamically create the page as these
pages are compiled and stored on the server for archive purposes.
Nov 30 '06 #2
Hello Kodali,
Thanks for your response, I will give this a try!
Jeff

"Kodali Ranganadh" <ko*************@gmail.comwrote in message
news:11**********************@14g2000cws.googlegro ups.com...
Hi .. Try with Ajax XMLHTTP Request Browser activeX object for filling
the HTML page into the div tag.
Example :
<script language="javascript" type="text/javascript">
var xmlHttp;
function Button1_onclick() {
if(window.ActiveXObject)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(Window.XmlHttpRequest)
{
xmlHttp=new XMLHttpRequest();
}
xmlHttp.open("GET","http://www.itoncorp.com",true);
xmlHttp.onreadystatechange=doUpdate;
xmlHttp.send();
}
function doUpdate()
{
var t= document.getElementById("divid");
if (xmlHttp.readyState==4) {
t.innerHTML=xmlHttp.responseText;
}
}
</Script>
The above script get the www.itoncorp.com html page using the ajax and
then fill this page into the div named "divid". Iw works good.
But the main desedvantage to use this method's is, it just replace the
InnerHTML with the itoncorp.com HTML page, But it does't get the fill
the images and other resources

U can use IFrames .. this also act's like a webBrowser.. May be it will
be sutable for get native view for the webpage u requested..

all the best ..

On Nov 30, 8:36 am, "Jeff Allan" <bookp...@community.nospamwrote:
>Hello,

I am trying to load an external HTML page into a DIV tag with .NET 05 and
I
can't figure it out. Any suggestions?

My Scenario:
- Gridview populated with list of available files
- I can get the external page to load in a new window just fine
- I would like the detail to show on the same page, below the list.
- I can't use the detail control and dynamically create the page as these
pages are compiled and stored on the server for archive purposes.

Nov 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mark Anderson | last post: by
5 posts views Thread by amit | last post: by
6 posts views Thread by Brandon McCombs | last post: by
1 post views Thread by charlie imac | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.