Re: Microsoft.XMLHTTP ASP.NET



Hi Tim:

The example you are showing is in JavaScript, and would run in the
client's browser.

If you want to pull the HTML from your C# code, your best bet is the
System.Net.WebClient and System.Net.WebRequest classes. The docs
contain C# examples on how to use the classes and Google will turn up
many more demonstrations.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetwebclientclasstopic.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetwebrequestclasstopic.asp


HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 3 May 2005 02:40:03 -0700, "Tim::.." <myatix_at_hotmail.com>
wrote:

>Can someone please help me with this annoying little problem...
>
>I use to use Microsoft.XMLHTTP in asp to pull html from other websites and
>inbed it into my website but for some reason I can't seem to find out how to
>do it in ASP.NET???
>
>I did find this example in C# but am not 100% sure it will do the same
>thing???
>
>I also want the following code in VB rather than C#
>
>Can someone please help me....
>
>Thanks
>
><code>
>var req;
>
>function loadXMLDoc(url) {
> // branch for native XMLHttpRequest object
> if (window.XMLHttpRequest) {
> req = new XMLHttpRequest();
> req.onreadystatechange = processReqChange;
> req.open("GET", url, true);
> req.send(null);
> // branch for IE/Windows ActiveX version
> } else if (window.ActiveXObject) {
> req = new ActiveXObject("Microsoft.XMLHTTP");
> if (req) {
> req.onreadystatechange = processReqChange;
> req.open("GET", url, true);
> req.send();
> }
> }
>}

.



Relevant Pages

  • Re: Suggestions please
    ... I mentioned my OS and browser because websites should work in different ... More people using Windows are turning to Mozilla (or its ... want a real html editor. ...
    (microsoft.public.windowsxp.general)
  • Re: Incorrect Website Coding -- A Bit Of A Grump
    ... Which shows how little meaning 'valid HTML' has. ... I just now subjected a half dozen websites produced with Freeway, ... Either set your browser to not allow fonts less than (pick your own font ...
    (comp.sys.mac.apps)
  • Re: OT: Spare pair of eyes needed.
    ... > Which of those did not render HTML? ... >>> browser I happen to be using, is usually the same as Jack's. ... > presented clearly - and there are plenty of websites that don't do that. ... If its because it has Microsoft in the ...
    (uk.comp.sys.mac)
  • Re: Suggestions please
    ... it should work (at least it works under Windows now). ... stuff that's not usually found on other websites. ... The site has been completely uploaded again with changes to browser ... > want a real html editor. ...
    (microsoft.public.windowsxp.general)
  • Re: Local or ISP problem?
    ... Like my browser will pull up the page ... not found display instantly. ... or it could even be problems with the websites themselves. ...
    (uk.telecom.broadband)