Asp.net 天气预报资料整理 初稿
ASP.NET获取天气预报大致分析有 1到某个网站上分析网站的代码获取;2自己写驱动服务和web服务 第二种水太深不曾涉及。
ASP.NET后台程序获取中央气象台天气预报
1.天气封装成一个实体
2.可以获取当天天气,也可以获取未来五天的天气集合
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
using System.Collections;
namespace CommonComponents
{
/// <summary>
/// 天气辅助类
/// </summary>
public class TqHelper
{
/// <summary>
/// 获取未来五天天气
/// </summary>
/// <param name="citycode">城市编号(例如:[url]http://www.weather.com.cn/html/weather/101010100.shtml[/url]中的“101010100”就是编号)</param>
/// <returns>未来五天的天气实体集合</returns>
public List<TqInfo> GetFiveDayTqList(string citycode)
{
List<TqInfo> tqInfoList = null;
Hashtable ht = GetTqHash(citycode);
if (ht!=null && ht.Count > 0)
{
tqInfoList = new List<TqInfo>();
for (int i = 1; i <= 5; i++)
&nbs
相关文档:
在C#中
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using System.Collections.Generic;
using System.Collections;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.Ba ......
asp.net装载进度条及工作页面框架主要由4个部分组成,这4个部分的名称及在整个框架中所起到的作用如下:
1.入口链接地址页面(aspx):比如,登录页面.提供到目标地址的一个链接,并向该目标传递一些启动必须的基本链接参数.
2.入口链接目标页面(aspx):该目标对象是整个框架的核心,页面装载时通过document.write输出2个iframe,其 ......
1. 注册js函数
String scriptString = "<script language=JavaScript>function doClick(){";
scriptString += "for(var index=0;index<myArray.length;index++)";
scriptString += "alert(myArray[index]);}<";
scriptString += "/" + "script>";
ClientScript.RegisterStartupScript(typeof(WebForm2) ......