由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - HttpWebRequest小程序
相关主题
问个c#的抓数据方面的问题c#中如何设置HttpWebRequest的UserAgent属性
RSS 简介 Re: HttpWebRequest小程序网页中没有id的元素怎么submit?
WebClient for multi-connections?问个问题
How to read SSL Socket stream? 关于SqlDataAdapter的初级问题求助
[合集] asp 打开oracle数据库问题。一个xml的问题。
新人再问 sql/linq: No connection string name d 'db5Entities' could be found in the application config fiDALFactory in PetShop 3
visual studio为什么不加eclipse修改建议的功能listbox 的问题
HTTP GET over SSL in C#Does .NET have built-in Cryptography?
相关话题的讨论汇总
话题: using话题: connect话题: weather话题: 程序
进入DotNet版参与讨论
1 (共1页)
E*******s
发帖数: 42
1
这个程序只是尝试一下how to connect to and read from a website.
这里我connect到一个天气预报的site.然后读取了html.
有时间加上form什么的, 可以做成一个小的天气预报application
using System;
using System.IO;
using System.Net;
using System.Text;
namespace edelweiss.Weather
{
public class Weather{
public Weather(){
}
private void connect(){

HttpWebRequest request;
HttpWebResponse response;
String weatherPrompt = @"font-size:20px";

string fullpath =
@"http://asp.usatoday.com/weather/cityforecast.aspx?Loca
L*******r
发帖数: 1011
2
好啊。不过如果对方改主业你的parse就有点问题了。
考虑一下这样:
google一下RSS
用RSS的方式获得信息可能更好。
Have fun!

@"http://asp.usatoday.com/weather/cityforecast.aspx?LocationID=USVA0023&ps=L1"

【在 E*******s 的大作中提到】
: 这个程序只是尝试一下how to connect to and read from a website.
: 这里我connect到一个天气预报的site.然后读取了html.
: 有时间加上form什么的, 可以做成一个小的天气预报application
: using System;
: using System.IO;
: using System.Net;
: using System.Text;
: namespace edelweiss.Weather
: {
: public class Weather{

E*******s
发帖数: 42
3
谢谢. 当时只是为了练习一下
什么是RSS?

【在 L*******r 的大作中提到】
: 好啊。不过如果对方改主业你的parse就有点问题了。
: 考虑一下这样:
: google一下RSS
: 用RSS的方式获得信息可能更好。
: Have fun!
:
: @"http://asp.usatoday.com/weather/cityforecast.aspx?LocationID=USVA0023&ps=L1"

1 (共1页)
进入DotNet版参与讨论
相关主题
Does .NET have built-in Cryptography?[合集] asp 打开oracle数据库问题。
website project新人再问 sql/linq: No connection string name d 'db5Entities' could be found in the application config fi
心得:use XPath (+namespace)visual studio为什么不加eclipse修改建议的功能
how to get reference.vb file?HTTP GET over SSL in C#
问个c#的抓数据方面的问题c#中如何设置HttpWebRequest的UserAgent属性
RSS 简介 Re: HttpWebRequest小程序网页中没有id的元素怎么submit?
WebClient for multi-connections?问个问题
How to read SSL Socket stream? 关于SqlDataAdapter的初级问题求助
相关话题的讨论汇总
话题: using话题: connect话题: weather话题: 程序