.NETGURU
XMLHTTP equivalent in .NET
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngxml' list.


Tim Curtin
I want to remote a URL query to SQL Server. What is the namespace equivalent
in .NET for the XMLHTTP object?
Thanks,

Tim

[Original message clipped]

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply to this message...
 
    
Dan Wahlin
XMLHTTP isn't in .NET, but you can use the WebRequest class within the
System.Net namespace to do similar things. You can find an example of
using it along with the associated WebResponse object here:

http://www.xmlforasp.net/codeSection.aspx?csID=9

HTH,
Dan Wahlin

Wahlin Consulting LLC
Microsoft MVP - ASP.NET
http://www.XMLforASP.Net: #1 ASP.NET XML Resource
XML for ASP.NET Developers by Dan Wahlin in bookstores everywhere!

-----Original Message-----
From: Tim Curtin [mailto:Click here to reveal e-mail address]
Sent: Thursday, July 11, 2002 6:27 AM
To: aspngxml
Subject: [aspngxml] XMLHTTP equivalent in .NET

I want to remote a URL query to SQL Server. What is the namespace
equivalent
in .NET for the XMLHTTP object?
Thanks,

Tim

[Original message clipped]

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

| [aspngxml] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngxml.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Kirk Allen Evans
There's not one, it follows the Request and Response framework in .NET.
Here is a quick example: You need to supply the URL to post to and the
string to post.

HttpWebRequest objRequest =
(HttpWebRequest)WebRequest.Create(url);
objRequest.Method = "POST";
objRequest.ContentType = "application/x-www-form-urlencoded";
objRequest.ContentLength = strPost.Length;

myWriter = new StreamWriter(objRequest.GetRequestStream());
myWriter.Write(strPost);
myWriter.Close();

HttpWebResponse objResponse =
(HttpWebResponse)objRequest.GetResponse();
using (StreamReader sr = new
StreamReader(objResponse.GetResponseStream()) )
{
// sr something
sr.Close();
}

Kirk Allen Evans
http://www.xmlandasp.net
"XML and ASP.NET", New Riders Publishing
http://www.amazon.com/exec/obidos/ASIN/073571200X

[Original message clipped]

Reply to this message...
 
 
System.IO.StreamReader
System.IO.StreamWriter
System.Net.HttpWebRequest
System.Net.HttpWebResponse
System.Net.WebRequest
System.Net.WebResponse




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification