<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[Theosoft.Blog]]></title>
<link>http://blog.theosoft.net/</link>
<description><![CDATA[Goddess Light My Path!]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog2 v2.4]]></copyright>
<webMaster><![CDATA[info@theosoft.net(Johnson)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>Theosoft.Blog</title> 
	<url>http://blog.theosoft.net/images/logos.gif</url> 
	<link>http://blog.theosoft.net/</link> 
	<description>Theosoft.Blog</description> 
</image>

			<item>
			<link>http://blog.theosoft.net/default.asp?id=101</link>
			<title><![CDATA[终于把自己的Blog搬离了我们伟大的祖国]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[建站日志]]></category>
			<pubDate>Fri,05 Mar 2010 09:14:16 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=101</guid>	
		<description><![CDATA[<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;" class="Apple-style-span"><span style="color: rgb(48, 48, 48); font-family: Arial,Helvetica,sans-serif; font-size: 13px; line-height: 19px;" class="Apple-style-span">
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">如今在国内想要做一个安分守己的站长真是越来越难了。面对这段时间出台的诸多政策，我已经无法想象中国&ldquo;互联网&rdquo;的未来是怎样的。很多关注我的空间的朋友一定早就觉察到我的空间在之前很长的一段时间里一直处于没有更新、甚至关站的状态下，其实这一切都跟这些&ldquo;政策&rdquo;多多少少有些关系，事情的缘由是这样的：</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">原本，这只是一个合法的、已经备案的、安分守己的Blog站点。去年的某一天，央视新闻曝光几个涉黄的网站。几乎就在同一天，我的网站再也打不开了。原本只是觉得一定又是九州的服务器问题，于是相当然的打开九州的主页http://www.hosting.czm.cn/，想要递交一个技术支持，看看到底怎么回事。可是令人诧异的是，居然连九州的主页也打不开了。什么？一个资深 9 年的ISP运营商，居然连自己的主页也打不开了？！在刷新了一遍又一遍，又ping了自己和九州的域名后，终于确认不是自己网络的问题，九州真的挂了！</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">在九州挂了之后，最先想到的，自然是立即启用我在222idc上的备用站点。幸好程序都有备份，虽然不是最新的，但至少基本功能都不差。数据库是没办法了，只能回档到几个月前了。架站点，导数据，修改域名解析。很快，新的临时站点终于建了起来。没过几天，九州也架起了临时主页，解释了事情的缘由。原来，那晚央视新闻里曝光的涉黄网站里，有一个网站和九州几乎所有的服务器都托管在高速BGP接入服务的 中电飞华 数据中心。而根据九州的说法，&ldquo;中电飞华并未采取积极的整改措施却采取了野蛮无理的封网行动。只要一家公司的名下的全部服务器中存在一条非法信息，就强制关闭其公司名下的全部服务器。并且关闭的方式为最为野蛮具有破坏力的 直接拔电源。封网后禁止任何人进行维护，包括备份数据，恢复时间遥遥无期&rdquo;。真有一种电影里官僚们&ldquo;宁可错杀一千，也不可放过一个&rdquo;的感觉啊！</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">经过了漫长的半个多月，九州也逐渐恢复了服务，当然&mdash;&mdash;也包括我的。备份程序和数据库，这几乎成了每一个经历过这互联网大灾难的站长最重要的事情。出于担心九州服务期的稳定性，我的站点暂时还没有迁回去。事情似乎就这样平息了，但事实远不止如此。没过几天，戏剧性的事情又发生了！我的临时站点又打不开了？！天哪，怎么又是ping不通服务器的情况！我战战兢兢的在浏览器里输入http://www.222idc.com/，敲下回车。因为经历过了上次九州的事件，心里多少有些忐忑。咦，打开了？哦，还好，222idc还活着！看来只是我的服务器挂了。打电话给客服，得到的答复居然是服务器的硬盘坏了！！！怎么会有这种事情？！好在这儿临时站点，平时只是用来提供Webservice的对外服务，即使数据丢失，问题也不大。这块硬盘最终也在今年1月中旬&ldquo;修好了&rdquo;，虽然丢失了所有数据库里的信息。</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">经过了这两轮事件的洗礼，让我对国内的虚拟主机供应商的信任降到了冰点。从那时起，我就开始谋划要将自己Blog的空间，搬到国外的主机上去。虽然早早的就下了决心，但要找一个廉价又符合要求的国外主机可也并非易事。1月26日，家庭生活消费网站篱笆网(liba.com)突然出现无法访问的故障，结果发现是因为其内容涉黄，被域名注册商停止解析其域名！呵呵，看来天朝找到了一个比&ldquo;到机房搬主机&rdquo;更方便的封闭网站的方法&mdash;&mdash;停止解析域名！事已至此，有了前车之鉴，就要接受教训。再加上万网和国内域名接入商纷纷发邮件通知站长递交个人资料，甚至以停止解析域名为要挟！这样的网络环境已经到了让人忍无可忍的地步！身边站长的网站也纷纷因为各种各样的&ldquo;理由&rdquo;备无辜关停。把网站和域名留在祖国已经成为一件相当危险的事情。于是在网上查了资料，又联系了美橙的客服，很快就确定了我的域名转出计划。打印了域名转出申请表，签上字，交由快递寄给了美橙浦东的办事处。同时又在Godaddy上用信用卡下了域名转入的订单，万事俱备，就等着邮箱收取域名转出密码了。</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">过完年，没几天。域名转出密码终于寄到了我的邮箱&mdash;&mdash;居然就是我的域名管理密码（晕）。然后在Godaddy输入密码，等了整整一个多星期，终于把域名转入了Godaddy名下。我还惊喜的发现，虽然再转入的时候没有选择private，但是域名转入后，whois上的数据除了注册人外，已经完全查不到我的个人信息了，而转入的费用$7.17甚至还比在美橙续费一年的费用还便宜，吼吼！昨天，又发现Godaddy的域名居然还送一个10G容量，300G流量的空间，附带10个mysql和1个mssql数据库，真是太完美了！除了没有开放socket权限，以及某些页面会有广告以外，简直太完美了！至此，无论是域名还是空间，我的Blog完全的脱离了祖国的怀抱，独自闯荡在浩瀚的互联网中，虽然空间搬到了国外，但是网速却几乎没有多大的影响，所以总体来说这次搬迁还是相当完美的。</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-indent: 21pt;" class="MsoNormal">再见了，祖国母亲！再见了，中国互联网！我想，下一次见面，可能就要和我们亲爱的Great Fire Wall打交道了，呵呵^_^</p>
<p style="margin: 0px; padding: 0px 0px 15px; text-align: center;"><img height="300" width="400" style="border: 1px solid rgb(211, 234, 243); padding: 5px;" alt="Great Wall" src="http://www.theosoft.net/wp-content/uploads/2010/03/greatwall.jpg" class="aligncenter" /></p>
</span></span>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=100</link>
			<title><![CDATA[闲来无事，写了个用飞信发短信的ppc软件]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[学习笔记]]></category>
			<pubDate>Sun,28 Jun 2009 21:50:22 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=100</guid>	
		<description><![CDATA[<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">真的好久好久没有认认真真地写</span><span lang="EN-US">Blog</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">了，每一次的借口都是</span><span lang="EN-US">&ldquo;</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">太忙了</span><span lang="EN-US">&rdquo;</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">，咳</span><span lang="EN-US">&hellip;&hellip;</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">先来汇报一下这段日子到底在忙些什么。最近忽然对飞信这个东东特别的感兴趣，因为可以免费发短信嘛。从网找来了一个</span><span lang="EN-US">php</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">版 的飞信客户端，发布到了自己的网站上。简单的看过源码，主要是模仿电脑版的飞信和飞信的服务器做交互。然后做了个支持短信群发的简单的支持get方式递交 数据的接口。但是很快就发现这样在发送含中文的短信时会变成乱码，除非事先对短信的内容进行UrlEncode，显然这样子调用很麻烦，所以就把那个 php的接口封装倒了我的Webservice里，取名SendSMS（string user,string psw,string phonelist,string msg);</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><img height="39" width="199" class="aligncenter size-full wp-image-108" title="sendsms1" src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms1.jpg" mce_src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms1.jpg" alt="sendsms1" /></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><img class="aligncenter size-full wp-image-109" title="sendsms" src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms.bmp" mce_src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms.bmp" alt="sendsms" /></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">细心的你应该注意到了，第三个参数名是phonelist，对的，这个方法是支持群发短信的哦（当然是一次登录、群发短信、然后再注销的，而不是多次登录的那种啦）。有了这个接口就方便了不少。其实在这之前还尝试过多种接口，在SendSMS方法下面还有</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">SendSMS1~3和</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">SendSMSList这样的方法，不过这些方法都是封装了我的账号的，所以不对外开放，而且有的方法基本都已经被弃用了。</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">有 了一个稳定的免费发短信的平台后，自然就会想到和webservice里的&ldquo;天气预报&rdquo;服务结合起来，搭建一个发送天气信息的短信平台，于是又忙活了起 来。我把每天按小时划分成24个point，在每个时间点上都可以定制一个手机号码的列表，到时间就按照这个列表向用户发送包含当天（18点以后为第二 天）天气信息的短信。下面是今天早上我自己收到的短信：</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;"><img height="316" width="237" class="aligncenter size-full wp-image-116" title="sms1" src="http://www.theosoft.net/wp-content/uploads/2009/06/sms1.jpg" mce_src="http://www.theosoft.net/wp-content/uploads/2009/06/sms1.jpg" alt="sms1" /><br /></span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">&ldquo;</span>XXX:上海, 多云转雷阵雨 , 26℃~35℃, 南风4-5级转西南风4-5级, 紫外线指数：中等, 穿衣指数：炎热 @ 2009年6月28日 星期天 农历闰五月初六<span mce_style="font-family: 宋体;" style="font-family: 宋体;">&rdquo;。呵呵，还不错吧。</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">再后来，就是今天的工作了。或许是觉得每次用手机飞信发短信，都得先等待漫长的登录时间，虽然是免费的，但是总觉得不爽。于是今天自己动手做了一个ppc上的短信发送软件，当然是通过飞信的。</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><img height="321" width="242" class="aligncenter size-full wp-image-112" title="sendsms2" src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms2.jpg" mce_src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms2.jpg" alt="sendsms2" /></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">界 面虽然丑了点，不过麻雀虽小五脏俱全。除了可以填号码、写短信外，还支持自定义一些常用的联系人和常用短语，这样就可以不用每次都费力的打字了，当然那也 弥补了目前不能访问手机通讯录的缺点（显然对方还要是你的飞信好友才行！）。因为是调用了webservice的接口的，同样支持短信群发。由于飞信的登 录和注销过程都由服务器端代理，发送短信的速度完全可以和直接发短信相媲美，还同时支持wifi，cmwap和cmnet</span><span mce_style="font-family: 宋体;" style="font-family: 宋体;">哦^_^</span></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><img height="321" width="241" class="aligncenter size-full wp-image-113" title="sendsms21" src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms21.jpg" mce_src="http://www.theosoft.net/wp-content/uploads/2009/06/sendsms21.jpg" alt="sendsms21" /></p>
<p class="MsoNormal" mce_style="text-indent: 21pt;" style="text-indent: 21pt;"><span mce_style="font-family: 宋体;" style="font-family: 宋体;">飞信的账号、密码以及常用的手机号和短语都是通过一个Config文件配置的，像下面这样：</span></p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;<br />&lt;configuration&gt;<br />&lt;!--飞信用户名--&gt;<br />&lt;User&gt;13xxxxxxxxx&lt;/User&gt;<br />&lt;!--飞信密码--&gt;<br />&lt;Psw&gt;123123&lt;/Psw&gt;<br />&lt;PhoneNo&gt;0&lt;/PhoneNo&gt;<br />&lt;PhoneNo&gt;1&lt;/PhoneNo&gt;<br />&lt;PhoneNo&gt;2&lt;/PhoneNo&gt;<br />&lt;CommMsg&gt;常用短语&lt;/CommMsg&gt;<br />&lt;/configuration&gt;</p>
</span>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=99</link>
			<title><![CDATA[让你的手机与Google同步]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[其它]]></category>
			<pubDate>Tue,24 Mar 2009 10:20:27 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=99</guid>	
		<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt; FONT-WEIGHT: normal">google<font face="宋体">在2月10日推出了自己的Google&nbsp;Sync同步平台，大家可以正式用上官方的了。下面是<span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">Windows&nbsp;Mobile<font face="宋体">平台Google&nbsp;Sync配置方法：</font></span></font></span></p>
<p><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt; FONT-WEIGHT: normal"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><font face="宋体">&nbsp;&nbsp;&nbsp; <span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">1<font face="宋体">、打开ActiveSync</font></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><br /></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<font face="宋体">、点击&ldquo;菜单&rdquo;-&gt;添加源服务器</font></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><br /></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3<font face="宋体">、在&ldquo;输入电子邮件地址&rdquo;步骤，输入Gmail的电子邮件地址（不要选中&ldquo;尝&nbsp; 试自动检测Exchange&nbsp;Server设置&rdquo;），点击下一步</font></span></font></span></span></p>
<p><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt; FONT-WEIGHT: normal"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><font face="宋体"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4<font face="宋体">、在&ldquo;编辑服务器设置&rdquo;步骤，输入服务器地址m.google.com(选中&ldquo;服务器需要加密的（SSL）连接&rdquo;)，点击下一步</font></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><br /></span>
<p align="center"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt; FONT-WEIGHT: normal"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><font face="宋体"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><img alt="" src="http://blog.theosoft.net/attachments/month_0903/72009324101438.bmp" /></span></font></span></span>
<p align="left"> </p>
</span></p>
</font></span></span></p>
<p>&nbsp;</p>
<p><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt; FONT-WEIGHT: normal"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><font face="宋体"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 5<font face="宋体">、在&ldquo;用户信息&rdquo;步骤，填写用户名字段（<a href="http://blog.theosoft.net/mailto:userid@gmail.com">userid@gmail.com</a>）、密码字段，域字段为空，选中&ldquo;保存密码&rdquo;，点击下一步</font></span></font></span></span></p>
<p align="center"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt; FONT-WEIGHT: normal"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><font face="宋体"><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"><img alt="" src="http://blog.theosoft.net/attachments/month_0903/r200932410165.bmp" />
<p><br /><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6<font face="宋体">、在&ldquo;编辑服务器设置&rdquo;步骤，选中要同步的数据，点击完成，开始同步操作</font></span></p>
</span>
<p><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt"></span><span style="FONT-FAMILY: &quot;Times New Roman&quot;; FONT-SIZE: 10.5pt">
<p align="center"><img alt="" src="http://blog.theosoft.net/attachments/month_0903/d2009324101636.bmp" /></p>
</span></p>
<p>&nbsp;</p>
<!--EndFragment--></font></span><!--EndFragment--></span></p>
<!--EndFragment--><!--EndFragment-->
<p>&nbsp;</p>
<!--EndFragment--><!--EndFragment--><!--EndFragment-->]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=98</link>
			<title><![CDATA[snapter—让数码相机替代移动扫描仪]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[破解]]></category>
			<pubDate>Fri,27 Feb 2009 13:31:53 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=98</guid>	
		<description><![CDATA[<span style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 16px/16px arial; WHITE-SPACE: normal; orPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(102,102,102); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="TEXT-ALIGN: left" class="Apple-style-span">
<p style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 1.5em; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 10px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px">snapter 是一个软件，结合数码相机使用可以替代扫描仪，能将数码相机拍摄的文档、名片、书页等转换成PDF文档。</p>
<p style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 1.5em; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 10px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px">使用扫描仪可以扫瞄平面化的文档,名片等，但是有很多东西是不方便扫描的，比如翻开的书本，面积较大且有外框的营业执照等等，当然，我们可以用数码相机先照出来然后采用 Photoshop 修改，但是有了snapter<span class="Apple-converted-space">&nbsp;</span>这样的方便的软件，我们又何必花多精力使用 Photoshop 呢？<br style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" />先看看 snapter 在处理翻开的书本的效果图：<br style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" /><img style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" alt="snapter" src="http://bspimages.yo2cdn.com/wp-content/bsp/images/e/c4/pic.yupoo.com%2Fthws%2F255786c79263%2Fvie7gnkc.jpg" /><br style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" />snapter (11M)提供有中文版，需要先安装.NET才能使用，操作简单，将数码照片拖拽到工作区，然后点击转换按钮即可转换，转换后的内容去掉了一些与主体无关的无用的边缘，比如照名片时，如果名片放置的桌面也被照进去，snapter在处理时会自动去掉名片周围的桌面部分使得名片占据整个页面，转换后的内容以 PDF 和其它各市的文件输出。因此借助 snapter ，有数码相机的朋友可以使用数码相机随时随地&ldquo;扫描&rdquo;，没有的朋友在买机之前也可以参考点评狂，一个专门针对数码消费品的点评网站，就性价比、易用性和图片质量进行综合测评，具有很高的参考价值。<br style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" />snapter 的操作演示：<br style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" /><embed style="PADDING-BOTTOM: 0px; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px" height="390" type="application/x-shockwave-flash" width="460" src="http://www.snapter.atiz.com/image/flash/Learnmore_Movie/movies/LearnMore03.swf"></embed></p>
<p style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 1.5em; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 10px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#3366ff">怎么样，这个软件很不错吧？！这么好的软件，当然还是要支持一把的。用OllyIce载入后发现程序是自我调试的，无法动态调试。无奈，看看里面的dll。发现有个叫ActSystem.dll的文件很可疑，于是载入。哈哈，果然就是它！强行改了验证程序版本的函数，（程序貌似分为未注册、Lite和Full三个版本），现在只要替换这个dll就直接是完整版本了。经测试，除了&ldquo;帮助-关于&rdquo;菜单不能用（这个菜单回去读注册的用户名，没注册，哪儿来的用户名呢？程序就出错了，这个等我有空了再改吧，不影响使用），其它功能一切正常，生成的pdf也不会有广告了，呵呵^_^</font></p>
<p style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 1.5em; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 10px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px"><font color="#3366ff">下面这个就是破解后的dll，覆盖原来的就行了。再给个原版的</font><a href="http://down.zdnet.com.cn/detail/3/25069.shtml" target="_blank"><font color="#ff0000">下载链接</font></a><font color="#3366ff">。</font></p>
<p style="PADDING-BOTTOM: 0px; LINE-HEIGHT: 1.5em; BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 10px; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; PADDING-RIGHT: 0px; FONT-FAMILY: arial, &quot;Trebuchet MS&quot;; WHITE-SPACE: normal; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: rgb(102,102,102); FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; BORDER-LEFT-WIDTH: 0px; TEXT-DECORATION: none; PADDING-TOP: 0px"><a href="http://blog.theosoft.net/attachments/month_0902/92009227132911.rar"><font color="#ff0000"><img style="MARGIN: 0px 2px -4px 0px" border="0" alt="" src="http://blog.theosoft.net/../../images/download.gif" /></font><font color="#ff0000">点击下载此文件</font></a></p>
</span></span>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=97</link>
			<title><![CDATA[FireFox下用js给div定位与在IE下的差别]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[学习笔记]]></category>
			<pubDate>Fri,06 Feb 2009 15:07:17 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=97</guid>	
		<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我们知道，如果obj是一个div对象，在IE要给它定位，只需要这样写：obj.left=XXX;obj.top=XXX;这样的写法在IE里可以顺利的通过，但是到了FireFox和Chrome下，就完全行不通了，因为这并不是标准的写法。在FireFox有规定，给像width、height、left、top这样的属性赋值，后面必须要定义单位，也就是我们常用的&quot;px&quot;。因此，如果把上面的语句换成：obj.left=XXX + &quot;px&quot;;obj.top=XXX + &quot;px&quot;;就可以顺利的在FireFox和Chrome下运行了<img src="http://blog.theosoft.net//fckeditor/editor/images/smiley/tt/face19.gif" alt="" /></p>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=96</link>
			<title><![CDATA[一个.Net下让checkbox只读同时保持样式（非disable）的小技巧]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[学习笔记]]></category>
			<pubDate>Mon,02 Feb 2009 15:21:33 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=96</guid>	
		<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用了这么久asp.Net，今天才发现checkbox居然没有类似readonly或changable的属性，想要保持控件的只读属性，就只能把它disable了，但是这样就变灰了，很不美观。在网上找了许久也没有答案，只有一个通过js的本办法，就是在用户改了checkbox的之后再把它改回来？！吼吼，就是这么简单！</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 具体的做法是在你的控件里加上这段： onclick=&quot;this.checked=!this.checked;&quot; 。试了下，效果还不错，呵呵<img src="http://blog.theosoft.net//fckeditor/editor/images/smiley/tt/face19.gif" alt="" /></p>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=95</link>
			<title><![CDATA[教你如何去掉心机TouchFlo 2D里的广告]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[学习笔记]]></category>
			<pubDate>Sun,14 Dec 2008 22:40:15 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=95</guid>	
		<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 十月底入手了一台HTC的VIVA，也就是传说中的T2223，水货，为了要wifi，国内行货版本是T2222。因为是繁体的系统，所以用着一直觉得不爽。好不容易昨天在网上找到了简体的rom，于是自己刷成了简体的系统。可是刷完以后才发现，原来简体的系统比繁体的系统还要不爽！到处都是移动的广告。VIVA预制的TouchFlo 2D是个很方便的桌面软件，可以迅速的切换常用的软件，可是呢，里面偏偏却有很多移动的标签页，很烦人。本以为装个个性化，可以迅速的切换TouchFlo的软件M2DC就可以去掉，可是就算禁用了移动的那个标签，也没有效果。还有那个&ldquo;移动梦网&rdquo;，放在首页&ldquo;日历&rdquo;的下面，把原来人家&ldquo;通话记录&rdquo;的地盘给占了，真是蛮不讲理，谁没事老上你这个破网站阿？！要是人家没订GPRS套餐，放在哪里岂不是很危险？稍不留神点到了，可能就要白送给移动好多钱哪！于是上网查了相关资料，发现原来这个软件是由一个xml文件配置的，放在/windows/HTCHomeSettings.xml下。打开，里面其中有一段是这样写的：</p>
<p>&nbsp;&nbsp;&nbsp; &lt;Tabs&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;CMCCHomeWidget enable=&quot;1&quot; tab_bg_icon=&quot;7,8&quot; tab_icon=&quot;69,70&quot; big_icon=&quot;29,30&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;OperatorWidget enable=&quot;0&quot; tab_bg_icon=&quot;120,129&quot; tab_icon=&quot;145,147&quot; big_icon=&quot;200,218&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;WeatherWidget enable=&quot;1&quot; tab_bg_icon=&quot;27,28&quot; tab_icon=&quot;176,177&quot; big_icon=&quot;67,68&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;PeopleWidget enable=&quot;1&quot; tab_bg_icon=&quot;19,20&quot; tab_icon=&quot;168,169&quot; big_icon=&quot;59,60&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;MessagingWidget enable=&quot;1&quot; tab_bg_icon=&quot;15,16&quot; tab_icon=&quot;115,165&quot; big_icon=&quot;37,38&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;EmailWidget enable=&quot;1&quot; tab_bg_icon=&quot;11,12&quot; tab_icon=&quot;111,112&quot; big_icon=&quot;33,34&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;InternetWidget enable=&quot;0&quot; tab_bg_icon=&quot;9,10&quot; tab_icon=&quot;71,110&quot; big_icon=&quot;31,32&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;PhotoWidget enable=&quot;1&quot; tab_bg_icon=&quot;21,22&quot; tab_icon=&quot;170,171&quot; big_icon=&quot;61,62&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;MusicWidget enable=&quot;0&quot; tab_bg_icon=&quot;17,18&quot; tab_icon=&quot;166,167&quot; big_icon=&quot;39,58&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;LocationWidget enable=&quot;0&quot; tab_bg_icon=&quot;13,14&quot; tab_icon=&quot;113,114&quot; big_icon=&quot;35,36&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SettingsWidget enable=&quot;1&quot; tab_bg_icon=&quot;25,26&quot; tab_icon=&quot;174,175&quot; big_icon=&quot;65,66&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;LauncherWidget enable=&quot;1&quot; tab_bg_icon=&quot;23,24&quot; tab_icon=&quot;172,173&quot; big_icon=&quot;63,64&quot; /&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/Tabs&gt;<br />可以看到，里面OperatorWidget的enable属性确实是0（False）了，但是它就是那么霸道的显示在那里！那么删掉它会怎么样呢？抱着试试看的心情，删掉了那一行。呵呵！奇迹出现了！果然，把那个讨厌的标签页给删掉了！</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 接下来还要把&ldquo;移动梦网&rdquo;给删掉，把原来被占用的&ldquo;通话记录&rdquo;恢复出来。于是接着往下找，看到这样一段：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;CMCCHomeWidget&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_CLOCKBTN_BGIMG&quot; id=&quot;0&quot; value=&quot;40&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&hellip;&hellip;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LINE_IMG&quot; id=&quot;100&quot; value=&quot;180&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LINE1_IMGPOS&quot; id=&quot;101&quot; value=&quot;28,156&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LINE2_IMGPOS&quot; id=&quot;102&quot; value=&quot;28,187&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LINE3_IMGPOS&quot; id=&quot;103&quot; value=&quot;28,218&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_DATE_RECT&quot; id=&quot;104&quot; value=&quot;28,133,212,154&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LAUNCHBTN_RECT&quot; id=&quot;200&quot; value=&quot;12,157,170,187&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LAUNCHBTN_IMG&quot; id=&quot;201&quot; value=&quot;225&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LAUNCHBTN_IMGPOS&quot; id=&quot;202&quot; value=&quot;29,160&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LAUNCHBTN_TEXT_RECT&quot; id=&quot;203&quot; value=&quot;55,158,170,186&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LAUNCHBTN_IMG_FOCUS&quot; id=&quot;204&quot; value=&quot;219&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDHMWG_LAUNCHBTN_IMG_FOCUS_DN&quot; id=&quot;205&quot; value=&quot;220&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_MISSEDCALLBTN_IMG_UNREAD&quot; id=&quot;300&quot; value=&quot;134&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_MISSEDCALLBTN_IMG_NOMISSED&quot; id=&quot;301&quot; value=&quot;224&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_RECT&quot; id=&quot;310&quot; value=&quot;12,188,228,218&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_IMG&quot; id=&quot;311&quot; value=&quot;223&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_IMG_RECT&quot; id=&quot;312&quot; value=&quot;29,191,53,215&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_TITLE_RECT&quot; id=&quot;313&quot; value=&quot;55,189,213,203&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_MESSAGE_RECT&quot; id=&quot;314&quot; value=&quot;55,203,213,217&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_IMG_FOCUS&quot; id=&quot;315&quot; value=&quot;181&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Property name=&quot;IDCMCCHMWG_RSSBTN_IMG_FOCUS_DN&quot; id=&quot;316&quot; value=&quot;182&quot; /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/CMCCHomeWidget&gt;<br />照着我原来繁体的一个主题里的xml文件，发现只要把&lt;Property name=&quot;IDHMWG_DATE_RECT&quot; id=&quot;104&quot; value=&quot;28,133,212,154&quot; /&gt;这行后面的记录（这行保留，到&lt;/CMCCHomeWidget&gt;前为止）都删掉就能把&ldquo;移动梦网&rdquo;给删了，但是要恢复&ldquo;通话记录&rdquo;倒是花了不少时间很功夫，参考了很多主题的xml文件才得以实现。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最后还把移动那个邪恶的数字时钟，改成了指针型的。不过不是原版的那种，偷了一个主题中的几张图片，稍微ps了一下，终于做成了下面这个效果：</p>
<p>&nbsp;<img alt="" src="http://blog.theosoft.net/attachments/month_0812/screen.png" align="middle" /></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 怎么样，还凑或吧？！至少没了那烦人的移动的广告，现在用起来舒坦多了。我把这个改动做成了M2DC的主题包，如果大家需要的话，应用一下这个主题包就行了。这个主题包会改动下面那个滑动的标签页的默认顺序，如果觉得不习惯，自己到M2DC里改一下就行了。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#ff0000">今天意外发现原来有些版本的M2DC在应用主题的时候，不会乖乖得替换我给的HTCHomeSettings.xml文件，而是指替换了部分内容？！导致部分机子在应用了我的主题后，出现错位，移动的标签仍存在等问题！如果出现以上问题，请点击下面的连接，安装替换HTCHomeSettings.xml的补丁。因为那个文件是系统+只读属性，所以安装后需要重启手机！</font></p>
<p><a href="http://blog.theosoft.net/attachments/month_0812/M2DC18.rar"><img style="MARGIN: 0px 2px -4px 0px" alt="" src="http://blog.theosoft.net/images/download.gif" border="0" />下载M2DC</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://blog.theosoft.net/attachments/month_0812/Theosoft_Theme.zip"><img style="MARGIN: 0px 2px -4px 0px" alt="" src="http://blog.theosoft.net/images/download.gif" border="0" />下载主题</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://blog.theosoft.net/attachments/month_0812/M2DC_Theme_Patch.cab"><img style="MARGIN: 0px 2px -4px 0px" alt="" src="http://blog.theosoft.net/images/download.gif" border="0" />下载主题补丁</a></p>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=94</link>
			<title><![CDATA[利用JQuery+Ajax实现aspx页面无刷新的动态数据绑定]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[学习笔记]]></category>
			<pubDate>Sun,19 Oct 2008 14:20:15 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=94</guid>	
		<description><![CDATA[<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">好长的名字啊！自己看得都觉得累了&hellip;&hellip;废话到此为止，开始正文：</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;</font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&nbsp;&nbsp;我们在写</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">asp.net</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">网页的时候，会用到很多需要数据绑定的控件。</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Asp.net</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">提供了数据绑定这一特性，确实方便了很多。但是这样的绑定都是在服务器端完成的，而我们有时会希望根据用户的选择来动态的更新其它一些控件的数据内容。例如用两个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">来让用户选择所在的城市，一个绑定&ldquo;省&rdquo;一级的数据，如&ldquo;浙江&rdquo;、&ldquo;吉林&rdquo;等，另一个绑定用户选择的&ldquo;省&rdquo;下面的城市。要实现这样一个动态的数据绑定其实不难，可以把前一个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">autopostback</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">属性设成</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">true</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">，然后在事件里绑定后一个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的数据就可以了。这样虽然是可以实现动态数据绑定，但是用户每选一个选项，网页就不得不刷新一次，内容一多，就很浪费时间。那有没有不刷新页面但又能动态绑定数据的方法呢？当然有！方法就是用现在十分流行的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">技术。</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri"><span style="mso-spacerun: yes"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;</font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&nbsp;&nbsp;</span></span>Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的应用十分广泛，这里仅仅介绍利用</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">JQuery</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">来实现异步数据更新的方法。</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">jQuery </font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是一个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">JavaScript </font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">库，它有助于简化</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri"> JavaScript</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&trade;</span><span style="FONT-SIZE: 9pt"><font face="Calibri"> </font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">以及</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri"> Asynchronous JavaScript + XML (Ajax) </font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">编程。在</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">JQuery</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">中有一个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的调用方法：</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">$.ajax({</font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">type: &quot;POST&quot;,</font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">url: window.location.protocol + &quot;//&quot; + window.location.host + &ldquo;a.aspx&rdquo;,</font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">data: postdata,</font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">complete: function(msg){ </font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">ShowResult(msg.responseText);</font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">} ,</font></span></p>
<p style="TEXT-ALIGN: left; TEXT-INDENT: 7.05pt; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: .67" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">dataType : &quot;html&quot;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">});</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;</font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&nbsp;&nbsp;这里的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">url</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是目标页面，通常我们会专门处理这些</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">请求，单独写一个页面，这里假定为</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax.aspx</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">。</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">data</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是你要</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">post</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">给目标页面的数据，例如&ldquo;</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">do=getcity&amp;province=100</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&rdquo;。</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Complete</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里的那个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">function</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">：</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ShowResult(msg.responseText);</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是用来处理</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的返回结果的，结果会以</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">html</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的形式保存在参数</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">msg.responseText</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里。</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">了解了这个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的调用方法，我们来说说到底怎样实现数据的动态绑定。还是以刚才说的&ldquo;选择城市&rdquo;作为例子。首先在你要显示的页面（例如</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Selectcity.aspx</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">）有一个空的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">（这个是用来选择&ldquo;城市&rdquo;的，不是那个选择&ldquo;省份&rdquo;的），在其外面包一个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">&lt;div&gt;</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">标签，</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">id</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">为</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">city</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">。这个是假的，只是在那里占个位子，真正的数据并不会绑定到这个控件上。然后我们在</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">页面</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax.aspx</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里也放一个一模一样的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">。然后我们绑定选择&ldquo;省份&rdquo;的那个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">onchange</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">事件（以下所说的事件，都是</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">javascript</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">事件，而非</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">asp.net</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">事件），让其调用我们的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">方法。然后，</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">会把用户选择的&ldquo;省份&rdquo;放在</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">postdata</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里（如&ldquo;</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">do=getcity&amp;province=100</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&rdquo;）传到</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">Ajax.aspx</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">页面，页面获得这个参数后，为</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax.aspx</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">上的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">绑定数据。结果以</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">html</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的形式保存到</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">msg.responseText</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里。</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;</font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&nbsp;&nbsp; 接下来要怎么做也许你已经想到了，对了，我们要用的就是&ldquo;狸猫换太子&rdquo;的手段。前面调用</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">方法的时候，不是还有一个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ShowResult</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的方法吗？那个方法在获得了我们</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">ajax</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">页面的返回结果。我们知道，</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">最终生成的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">&lt;select&gt;</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">空间，所以我们把返回结果里从&ldquo;</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">&lt;select&gt;</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&rdquo;到&ldquo;</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">&lt;/select&gt;</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">&rdquo;之间的部分提取出来，替换到那个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">id=city</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">div</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">innerHTML</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里，覆盖原来占位的那个</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">。于是，我们的动态数据绑定就完成了。</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span style="FONT-SIZE: 9pt" lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">不知道你听明白了没有，下面给出文中提到的各个文件的源码，如果你没有看明白，就自己捉摸捉摸吧</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">^_^ </font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><b style="mso-bidi-font-weight: normal"><u><span lang="EN-US"><font size="3"><font face="Calibri">Ajax.js </font></font></span></u></b></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">function GetCity(provinceID)</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">{</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>$.ajax({</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>type: &quot;POST&quot;,</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>url: window.location.protocol + &quot;//&quot; + window.location.host + &quot;/Ajax.aspx&quot;,</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>data:<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>&quot;do=GetCity&amp;ProvinceID=&quot; + provinceID,</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>complete: function(msg){ </font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ShowCity(msg.responseText);</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>} ,</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>dataType : &quot;html&quot;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>}); <span style="mso-tab-count: 1">&nbsp;&nbsp; </span></font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">}</font></span><span lang="EN-US"></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">function ShowCity(strCode)</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">{</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>var obj = document.getElementByid(&quot;City&quot;);</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>var start = strCode.indexOf(&quot;&lt;select&quot;);</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>var end = strCode.indexOf(&quot;&lt;/select&gt;&quot;) + 9;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>var strHtml = strCode.substring(start,end);</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><span style="mso-tab-count: 1"><font size="3" face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>if (obj!=null)</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>{<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>obj.innerHTML = strHtml;<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>}</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">}</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><b style="mso-bidi-font-weight: normal"><u><span lang="EN-US"><font size="3"><font face="Calibri">Selectcity.aspx </font></font></span></u></b></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">&lt;%@ Page language=&quot;c#&quot; Codebehind=&quot;Selectcity.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;Selectcity&quot; %&gt;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">&lt;html&gt;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp; </span>&lt;head&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;title&gt;Selectcity&lt;/title&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>&lt;script language=&quot;JavaScript&quot; src=&quot;/Ajax.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>&lt;script language=&quot;JavaScript&quot; src=&quot;/jQuery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp; </span>&lt;/head&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;body topmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;asp:DropDownList ID=&quot;province&quot; runat=&quot;server&quot;&gt;&lt;/asp:DropDownList&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;div id=&quot;city&quot;&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;asp:DropDownList ID=&quot;oldcity&quot; runat=&quot;server&quot;&gt;&lt;/asp:DropDownList&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/div&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/form&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/body&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">&lt;/html&gt;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri"></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><b style="mso-bidi-font-weight: normal"><u><span lang="EN-US"><font size="3"><font face="Calibri">Selectcity.aspx.cs </font></font></span></u></b></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">这个就不给了，随便给那个</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><font size="3" face="Calibri">ID= province</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span style="mso-bidi-font-size: 10.5pt" lang="EN-US"><font size="3" face="Calibri">DropDownList</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">绑定点数据即可。</span><span style="FONT-SIZE: 9pt" lang="EN-US"> </span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><b style="mso-bidi-font-weight: normal"><u><span lang="EN-US"><font size="3"><font face="Calibri">ajax.aspx </font></font></span></u></b></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">&lt;%@ Page language=&quot;c#&quot; Codebehind=&quot;Ajax.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;Selectcity&quot; %&gt;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">&lt;html&gt;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp; </span>&lt;head&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;title&gt;Selectcity&lt;/title&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>&lt;script language=&quot;JavaScript&quot; src=&quot;/Ajax.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>&lt;script language=&quot;JavaScript&quot; src=&quot;/jQuery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp; </span>&lt;/head&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;body topmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;asp:DropDownList ID=&quot;city&quot; runat=&quot;server&quot;&gt;&lt;/asp:DropDownList&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/form&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/body&gt;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">&lt;/html&gt;</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><font size="3"><b style="mso-bidi-font-weight: normal"><u><span lang="EN-US"><font face="Calibri">Ajax.aspx.cs</font></span></u></b><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">（</span></font><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">只列出关键代码，其它的省略</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"><font size="3">）</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">protected void Page_Load(object sender, EventArgs e)</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">{</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>string strAction = Request.Form[&quot;do&quot;] + String.Empty;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>switch (strAction)</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>{</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>case &quot;GetCity&quot;:</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>GetCity();</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>break;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>}</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">}</font></span><span lang="EN-US"></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">protected void GetCity()</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">{</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>string strProvinceID = Request.Form[&quot;ProvinceID&quot;] ?? String.Empty;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>if (!String.IsNullOrEmpty(strProvinceID))</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>{</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><font face="Calibri"><span lang="EN-US"><font size="3"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>List&lt;City&gt; CityList = /</font></span><span style="FONT-SIZE: 9pt" lang="EN-US">*</span></font><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">你要绑定的数据</span><font face="Calibri"><span style="FONT-SIZE: 9pt" lang="EN-US">*</span><span lang="EN-US"><font size="3">/;</font></span></font></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>this.City.DataTextField = &quot;CityName&quot;;<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </span>//</font></font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">这里的</span><span style="FONT-SIZE: 9pt" lang="EN-US"><font face="Calibri">city</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">就是前面</span><span lang="EN-US"><font size="3" face="Calibri">aspx</font></span><span style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的</span><span lang="EN-US"><font size="3" face="Calibri">DropDownList</font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>this.City.DataValueField = &quot;CityID&quot;;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>this.City.DataSource = CityList;</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>this.City.DataBind();</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>}</font></font></span></p>
<p style="TEXT-ALIGN: left; MARGIN: 0cm 0cm 0pt" class="MsoNormal" align="left"><span lang="EN-US"><font size="3" face="Calibri">}</font></span></p>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=93</link>
			<title><![CDATA[在Web service和.Net服务页面中简单得对调用者进行跟踪]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[学习笔记]]></category>
			<pubDate>Tue,02 Sep 2008 14:59:04 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=93</guid>	
		<description><![CDATA[<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; mso-char-indent-count: 2.0"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Web Service</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">是微软在</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">.Net Framework</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">里提供的一个十分方便的机制。它允许你将一些实用的，需要被多人分享或者不方便在本地运行的一些功能发布到网站上，像</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">dll</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">一样随时在需要的时候加以调用。还有一些简单的服务页面，诸如本站的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><a href="http://www.theosoft.net/weather" target="_blank"><span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"><span lang="EN-US"><font color="#0000ff">天气预报页面</font></span></span></a></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">和</span><span lang="EN-US" style="FONT-SIZE: 9pt"><a href="http://www.theosoft.net/ipsearch" target="_blank"><font color="#0000ff"><font face="Calibri">IP</font><span lang="EN-US" style="FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin"><span lang="EN-US">查询页面</span></span></font></a></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">。分别以图片形式输出当地的天气情况和以</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Javascript</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的形式输出一段返回</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">地址查询结果的脚本。这样的页面功能简单、单一，可以像普通的图片（</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">&lt;img&gt;</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">）或脚本（</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">&lt;script&gt;</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">）的方式调用。但有时候，无论是出于日志记录、权限校验、性能分析或者别的什么应用的需要，你可能希望知道到底是哪些人调用了自己的这些服务。那么到底应该怎样记录下这些来访者呢？</span><span lang="EN-US" style="FONT-SIZE: 9pt">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">对于</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Web Service</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">来说，虽然不能直接获得</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Request</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">对象，但是还是可以通过</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Context.Request</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">来得到。不过，如果你仅仅通过</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Context.Request.UserHostAddress</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">来获得</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的话，你会发现所有的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">其实都是服务器自己的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">。这可不是因为那些请求都是你自己调用的，而是因为所有的请求其实都是通过服务器的代理来实现的，所以这些</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">当然都是服务器自己。想要获得真正的调用者，就要透过代理服务器：</span><span lang="EN-US" style="FONT-SIZE: 9pt">
<p>&nbsp;<font face="Calibri"><span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #0066ff; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">if</span><span lang="EN-US" style="FONT-SIZE: 9pt; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> (Context.Request.ServerVariables[<span style="COLOR: #31849b; mso-themecolor: accent5; mso-themeshade: 191">&quot;HTTP_VIA&quot;</span>] != <span style="COLOR: #0066ff">null</span>)
<p>&nbsp;<span lang="EN-US" style="FONT-SIZE: 9pt; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><font face="Calibri">{
<p>&nbsp;<span lang="EN-US" style="FONT-SIZE: 9pt; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><font face="Calibri"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ip = Context.Request.ServerVariables[<span style="COLOR: #31849b; mso-themecolor: accent5; mso-themeshade: 191">&quot;HTTP_X_FORWARDED_FOR&quot;</span>].ToString();
<p>&nbsp;<span lang="EN-US" style="FONT-SIZE: 9pt; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><font face="Calibri">}
<p>&nbsp;<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">这样得道的就是真正调用你的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Web Service</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">的那些远程方法的&ldquo;幕后黑手&rdquo;。</span><span lang="EN-US" style="FONT-SIZE: 9pt">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">而对于那些可以在</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">&lt;img&gt;</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">、</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">&lt;script&gt;</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">这样的标签里直接引用的功能型页面来说，所有的调用都来自客户端的直接访问，通过</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Request.UserHostAddress</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">只能得到客户端的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">，那么又该如何找到那个&ldquo;幕后黑手&rdquo;呢？这时候就需要</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">Request.UrlReferrer</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">对象来帮忙了。</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">UrlReferrer</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">通常是在超链接的页面里获得&ldquo;来源&rdquo;的父页面的，不过这里也同样可以用来获得引用这些</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">&lt;img&gt;</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">、</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">&lt;script&gt;</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">标签的页面。而且</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">UrlReferrer</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">获得的是</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">URL</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">，这可要比只知道对方的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">IP</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">强多了。<u>不过，值得注意的是，因为</u></span><u><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Calibri">UrlReferrer</font></span></u><u><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">在客户端的请求中是可以任意伪造的，所以如果想用这个作为权限审核的条件的话会很不安全哦！</span></u></p>
</span></p>
<p>&nbsp;</p>
</font></span></p>
<p>&nbsp;</p>
</font></span></p>
<p>&nbsp;</p>
</font></span></p>
<p>&nbsp;</p>
</span></font></p>
<p>&nbsp;</p>
</span></p>
<p>&nbsp;</p>
</span></p>
<p>&nbsp;</p>]]></description>
		</item>
		
			<item>
			<link>http://blog.theosoft.net/default.asp?id=92</link>
			<title><![CDATA[发布集成“IP地址查询”和“天气预报”的WebService项目，Beta1]]></title>
			<author>info@theosoft.net(Johnson)</author>
			<category><![CDATA[程序/作品]]></category>
			<pubDate>Sat,23 Aug 2008 13:28:04 +0800</pubDate>
			<guid>http://blog.theosoft.net/default.asp?id=92</guid>	
		<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 今天很高兴得对外发布了我新的基于Asp .Net 的WebService项目：TheoService（嗯，暂时就取这个名字吧）。有了这个WebService项目，今后就可以更好得分享本站上诸如IP地址查询、天气预报这样比较实用的功能，同时也让我自己的这些零零碎碎的小项目有了一个统一的调用接口，也方便了今后的管理。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 好了，废话就先说到这里，还是先来公布这个WebService的地址吧。该项目的地址是<a href="http://www.theosoft.cn/webservice/theoservice.asmx" target="_blank">http://www.theosoft.cn/webservice/theoservice.asmx</a>。点击这个地址，可以看到该项目暂时对外提供5个函数接口。</p>
<p><img alt="" src="http://blog.theosoft.net/attachments/month_0808/82008823125742.png" /></p>
<p>点击右边的 <a href="http://www.theosoft.cn/webservice/theoservice.asmx?WSDL" target="_blank"><strong><font color="#6699cc">Service Description</font></strong></a>&nbsp;可以查看该WebService的WSDL文档描述。点击这些函数名，你也可以查看这些函数详细的参数定义。我先在这里做个简单的介绍吧。</p>
<p><a href="http://www.theosoft.cn/webservice/theoservice.asmx?op=GetAddress" target="_blank"><strong><font color="#6699cc">GetAddress</font></strong></a> ：<font color="#0000ff">string</font> GetAddress(<font color="#0000ff">string</font> myip);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 输入参数为IPv4地址，返回值为该IP所属的地区</p>
<p><a href="http://www.theosoft.cn/webservice/theoservice.asmx?op=GetWeatherByCity" target="_blank"><strong><font color="#6699cc">GetWeatherByCity</font></strong></a> ：<font color="#0000ff">Weather</font> GetWeatherByCity(<font color="#0000ff">string</font> CityName);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 输入参数为城市名，返回值为Service所定义的Weather类型，包含天气的所有信息</p>
<p><a href="http://www.theosoft.cn/webservice/theoservice.asmx?op=GetWeatherByIP" target="_blank"><strong><font color="#6699cc">GetWeatherByIP</font></strong></a>：<font color="#0000ff">Weather</font> GetWeatherByIP(<font color="#0000ff">string</font> MyIP);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 输入参数为IPv4地址，返回值为该IP所属的地区(城市)的天气</p>
<p><a href="http://www.theosoft.cn/webservice/theoservice.asmx?op=GetWeatherImgByCity" target="_blank"><strong><font color="#6699cc">GetWeatherImgByCity</font></strong></a> ：<font color="#0000ff">byte</font>[] GetWeatherImgByCity(<font color="#0000ff">string</font> CityName, <font color="#0000ff">string</font> backColor)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;输入参数为城市名和图片背景色，返回值为<font color="#0000ff">byte</font>[] 类型的图片数据流</p>
<p><a href="http://www.theosoft.cn/webservice/theoservice.asmx?op=GetWeatherImgByIP" target="_blank"><strong><font color="#6699cc">GetWeatherImgByIP</font></strong></a>：<font color="#000000"><font color="#0000ff">byte</font>[] GetWeatherImgByIP(<font color="#0000ff">string</font> MyIP, <font color="#0000ff">string</font> backColor)</font>;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 输入参数为IPv4地址和图片背景色，返回值为<font color="#0000ff">byte</font>[] 类型的图片数据流</p>
<p><font color="#ff0000">注：图片背景色是html里用的6位的RGB编码，<a href="http://blog.theosoft.net/article.asp?id=88" target="_blank"><font color="#ff0000">详见示例</font></a></font></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 好了，函数就先介绍到这里，下面举个使用该WebService的简单的范例。</p>
<p>就以本站的天气预报功能来说吧。大家肯定都注意到了本站右上角会以一张图片的形式显示您所在地区的天气情况。就是这个<img alt="" src="http://www.theosoft.net/weather/" />。这个天气预报会根据访问者的IP自动识别出其所在的城市，并给出该城市的气象数据。那么究竟该怎样实现这一功能呢？答案其实很简单。首先当然是要在你的网站里添加我的这个WebService的引用。</p>
<p>右键点击你的项目，选择&ldquo;添加Web引用&rdquo;</p>
<p><img alt="" src="http://blog.theosoft.net/attachments/month_0808/72008823132024.png" /></p>
<p>然后在&quot;URL&quot;里填上WebService的地址，再启个合适的引用名（这里假定Theosoft.Service）</p>
<p><a href="http://blog.theosoft.net/attachments/month_0808/i2008823132252.png" target="_blank"><img height="468" alt="" src="http://blog.theosoft.net/attachments/month_0808/i2008823132252.png" width="600" /></a></p>
<p>点击&quot;添加引用&quot;后，就完成了。然后，再简单的写一段代码，获得用户的IP地址，并将网页以图片形式输出，这个功能就完成了。</p>
<div class="source" style="FONT-FAMILY: '[object]','Consolas','Lucida Console','Courier New'; BACKGROUND-COLOR: #f9f7ed" jquery1219466565425="2"><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span><span style="COLOR: #0000aa">using</span> <span style="COLOR: #00aaaa; TEXT-DECORATION: underline">System</span>;<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span><span style="COLOR: #0000aa">using</span> <span style="COLOR: #00aaaa; TEXT-DECORATION: underline">Theosoft.Service</span>;<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span><br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span><span style="COLOR: #0000aa">public</span> <span style="COLOR: #0000aa">partial</span> <span style="COLOR: #0000aa">class</span> <span style="COLOR: #00aa00; TEXT-DECORATION: underline">_Default</span> : System.Web.UI.Page <br /><span class="lineno special"></span><span style="COLOR: #0000aa">{</span><br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp; <span style="COLOR: #0000aa">protected</span> <span style="COLOR: #0000aa">void</span> <span style="COLOR: #00aa00">Page_Load</span>(<span style="COLOR: #00aaaa">object</span> sender, EventArgs e)<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp; <span style="COLOR: #0000aa">{</span><br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#3366ff">TheoService</font> TS = <span style="COLOR: #0000aa">new</span> <font color="#3366ff">TheoService</font>();<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="COLOR: #00aaaa">string</span> bgColor = <span style="COLOR: #aa5500">&quot;#&quot;</span> + Request.QueryString[<span style="COLOR: #aa5500">&quot;color&quot;</span>];<br /><span class="lineno special"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="COLOR: #00aaaa">string</span> myip = Request.UserHostAddress;<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="COLOR: #00aaaa">byte</span>[] bmp = TS.GetWeatherImgByIP(myip, bgColor);<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ClearContent();<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ContentType = <span style="COLOR: #aa5500">&quot;image/png&quot;</span>;<br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.BinaryWrite(bmp);<br /><span class="lineno special"></span>&nbsp;&nbsp;&nbsp; <span style="COLOR: #0000aa">}</span><br /><span class="lineno" style="COLOR: #aaaaaa; FONT-STYLE: italic"></span><span style="COLOR: #0000aa">}</span><br /></div>]]></description>
		</item>
		
</channel>
</rss>