load external html vs 2005

  • Thread starter Thread starter Jeff Allan
  • Start date Start date
J

Jeff Allan

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.
 
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 ..
 
Back
Top