Multimobile Development: Building Applications for any Smartphone
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...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
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...
Vote that this is a GOOD answer...
 
First volume of Multimobile Development nearly ready to go to press
A mention on Developing for the iPhone and Android: The pros and cons
 
    
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...
Vote that this is a GOOD answer...
 
 
 
System.IO.StreamReader
System.IO.StreamWriter
System.Net.HttpWebRequest
System.Net.HttpWebResponse
System.Net.WebRequest
System.Net.WebResponse




Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734