<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Communicating with a Web Server</title>
	<atom:link href="http://funcode.org/article/csharp/communicating-with-a-web-server.aspx/feed" rel="self" type="application/rss+xml" />
	<link>http://funcode.org/article/csharp/communicating-with-a-web-server.aspx</link>
	<description>free online programming resource on dotnet, csharp, web related topics</description>
	<pubDate>Tue, 06 Jan 2009 10:23:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Obtaining the HTML from a URL - Programming Tutorial On The Way</title>
		<link>http://funcode.org/article/csharp/communicating-with-a-web-server.aspx#comment-353</link>
		<dc:creator>Obtaining the HTML from a URL - Programming Tutorial On The Way</dc:creator>
		<pubDate>Sat, 21 Apr 2007 17:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://funcode.org/article/csharp/communicating-with-a-web-server.aspx#comment-353</guid>
		<description>[...] We can use the methods for web communication we have, VerifyResponse from Handling Web Server Errors and GenerateGetOrPostRequest from Communicating with a Web Server, to make the HTTP request and verify the response; then, we can get at the HTML via the ResponseStream property of the HttpWebResponse object: [...]</description>
		<content:encoded><![CDATA[<p>[...] We can use the methods for web communication we have, VerifyResponse from Handling Web Server Errors and GenerateGetOrPostRequest from Communicating with a Web Server, to make the HTTP request and verify the response; then, we can get at the HTML via the ResponseStream property of the HttpWebResponse object: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oskar_khow</title>
		<link>http://funcode.org/article/csharp/communicating-with-a-web-server.aspx#comment-130</link>
		<dc:creator>oskar_khow</dc:creator>
		<pubDate>Wed, 28 Mar 2007 10:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://funcode.org/article/csharp/communicating-with-a-web-server.aspx#comment-130</guid>
		<description>hi, abhijit.
As page1.aspx will do a post to page2.aspx and expecting some returns, the page2.aspx, simply just need to return with:
&lt;pre&gt;Response.Write("yes, you got me. I'm page2.aspx")&lt;/pre&gt;
When page1.aspx got the response (HttpWebResponse), you can inspect the response data using the members of the class. You can have more information on HttpWebResponse at http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse_members.aspx

Hope it helps :)</description>
		<content:encoded><![CDATA[<p>hi, abhijit.<br />
As page1.aspx will do a post to page2.aspx and expecting some returns, the page2.aspx, simply just need to return with:</p>
<pre>Response.Write("yes, you got me. I'm page2.aspx")</pre>
<p>When page1.aspx got the response (HttpWebResponse), you can inspect the response data using the members of the class. You can have more information on HttpWebResponse at <a href="http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse_members.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse_members.aspx</a></p>
<p>Hope it helps <img src='http://funcode.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abhijit</title>
		<link>http://funcode.org/article/csharp/communicating-with-a-web-server.aspx#comment-129</link>
		<dc:creator>abhijit</dc:creator>
		<pubDate>Wed, 28 Mar 2007 06:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://funcode.org/article/csharp/communicating-with-a-web-server.aspx#comment-129</guid>
		<description>if i have a page page1.aspx that will post data to page2.aspx

what should be the code for page2.aspx
should this code be written in the page_load event like

        string result = "";
        
        string username = Request["username"];
        string userpass = Request["password"];

        result = "username: " + username + " password: " + userpass;
       
        System.IO.Stream newStream = new System.IO.MemoryStream(ASCIIEncoding.Default.GetBytes(result));
        System.IO.StreamWriter newStreamWriter = new System.IO.StreamWriter(newStream);
        HttpResponse newHttpResponse = new HttpResponse(newStreamWriter);
        newHttpResponse.Write(result);

and the result returned to page1.aspx</description>
		<content:encoded><![CDATA[<p>if i have a page page1.aspx that will post data to page2.aspx</p>
<p>what should be the code for page2.aspx<br />
should this code be written in the page_load event like</p>
<p>        string result = &#8220;&#8221;;</p>
<p>        string username = Request["username"];<br />
        string userpass = Request["password"];</p>
<p>        result = &#8220;username: &#8221; + username + &#8221; password: &#8221; + userpass;</p>
<p>        System.IO.Stream newStream = new System.IO.MemoryStream(ASCIIEncoding.Default.GetBytes(result));<br />
        System.IO.StreamWriter newStreamWriter = new System.IO.StreamWriter(newStream);<br />
        HttpResponse newHttpResponse = new HttpResponse(newStreamWriter);<br />
        newHttpResponse.Write(result);</p>
<p>and the result returned to page1.aspx</p>
]]></content:encoded>
	</item>
</channel>
</rss>
