What to use instead of xmlhttp

Signaturevirus

New Member
Is there a good dot net equivilent for xmlhttp? How do you use it to add a custom header, send a xml doc,(generated with the DOM) and get an xml doc back for further processing?<BR><BR>Or do I need to use xmlhttp? How do I get it into dotnet? How is it used in dot net?<BR><BR>I tried using webclient but had no luck getting it working.<BR><BR>Thanks.You should use a technique called "Screen Scrapping" which is featured in nice colorful pages in the June Edition of ASP.NETPRO magazine. <BR><BR>Buy it.. it's good. Here's a site with a general idea about it:<BR>http://www.codeproject.com/aspnet/weather.asp<BR><BR>Hope this helps you.<BR><BR>-Vadim C.It gets the data from the "scraped" HTML page one line at a time:<BR><BR>*****************<BR>StreamReader stream = new StreamReader(req.GetResponse().GetResponseStream() );<BR><BR>// Get the stream from the returned web response<BR>System.Text.StringBuilder sb = new System.Text.StringBuilder();<BR>string strLine;<BR>// Read the stream a line at a time and place each one<BR>// into the stringbuilder<BR>while( (strLine = stream.ReadLine()) != null )<BR>{<BR> // Ignore blank lines<BR> if(strLine.Length > 0 )<BR> sb.Append(strLine);<BR>}<BR>*******************<BR><BR>It would seem to me to be tons more efficient to use either the Read(char(),int,int) or the ReadToEnd( ) method on that Stream, rather than going a line at a time. If you were processing the text, on the fly, as you read one line at a time it would make sense. But since all that code does is rebuild the stream into a single String, anyway... Well, it doesn't make sense.<BR><BR>
 
Back
Top