<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[海峡IT网 - Asp.Net]]></title>
<link>http://www.haixiait.com/</link>
<description><![CDATA[haixiaIT.COM_创造价值,传播技术,分享快乐!]]></description>
<language>zh-cn</language>
<copyright><![CDATA[Copyright 2005 PBlog3 v2.8]]></copyright>
<webMaster><![CDATA[airzen@126.com(airzen)]]></webMaster>
<generator>PBlog2 v2.4</generator> 
<image>
	<title>海峡IT网</title>
	<url>http://www.haixiait.com/images/logos.gif</url>
	<link>http://www.haixiait.com/</link>
	<description>海峡IT网</description>
</image>

			<item>
			<link>http://www.haixiait.com/article.asp?id=363</link>
			<title><![CDATA[ASP中的键值对，类似于哈希数组]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Thu,24 Sep 2009 14:58:04 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=363</guid>
		<description><![CDATA[<p>&lt;%<br />
ProductNumbers=split(&quot;1,2,3&quot;,&quot;,&quot;)<br />
ProductIDs=split(&quot;300,200,100&quot;,&quot;,&quot;)</p>
<p><br />
'by airzen <br />
Dim dic&nbsp; <br />
Set dic = CreateObject(&quot;Scripting.Dictionary&quot;) '创建键值对对象</p>
<p>For I=1 To UBound(ProductNumbers)<br />
&nbsp;dic.Add ProductIDs(I),ProductNumbers(I)&nbsp;&nbsp; ' 添加键值和键值内容.<br />
Next</p>
<p>response.write(dic.Item(&quot;200&quot;))<br />
%&gt;</p>
<p>&nbsp;</p>
<p>今天一个哥们做购物车时，遇到了一个问题，采用这种方法很好的被解决。。</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=283</link>
			<title><![CDATA[ASP.NET MVC 1.0终于发布了]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Thu,19 Mar 2009 11:05:52 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=283</guid>
		<description><![CDATA[<p>看到<a href="http://www.cnblogs.com/ibillguo/archive/2009/03/18/1415745.html" target="_blank">Silverlight 3 Beta发布了</a>后，听说ASP.NET MVC 1.0发布了，就去<a href="http://www.asp.net/mvc/" target="_blank">ASP.NET MVC</a>的官方站看了下，果然看到是1.0发布了，看了下Release Notes(带目录才6页)，基本和RC2没啥变化。&nbsp;下面是下载地址：</p>
<p>&nbsp;</p>
<p><a title="http://go.microsoft.com/fwlink/?LinkId=144444" href="http://go.microsoft.com/fwlink/?LinkId=144444" target="_blank">http://go.microsoft.com/fwlink/?LinkId=144444</a></p>
<p>下面是ASP.NET MVC的在线文档：</p>
<p><a href="http://go.microsoft.com/fwlink/?LinkId=145989" target="_blank">http://go.microsoft.com/fwlink/?LinkId=145989</a></p>
<p>已知下面的Visual Studio add-ins 会和MVC的安装程序有冲突：</p>
<p>&middot; PowerCommands</p>
<p>&middot; Clone Detective</p>
<p>&middot; Azure Tools</p>
<p>可以下载下面的Hotfix修复</p>
<p><a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&amp;wa=wsignin1.0">https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&amp;wa=wsignin1.0</a></p>
<p>经过5个preview和2个RC后，好不容易终于发了1.0，可喜可贺，哈哈&hellip;</p>
<p>下面是一些资源：</p>
<p><a href="http://www.cnblogs.com/QLeelulu/archive/2008/07/02/1233836.html" target="_blank">ASP.NET MVC 文章推荐</a></p>
<p><a href="http://www.cnblogs.com/QLeelulu/archive/2008/10/05/1303997.html" target="_blank">ASP.NET MVC 入门系列教程</a>(基本是Preview5的，和正式版有一点点出入)</p>
<p>重典的教程：</p>
<p><a href="http://www.cnblogs.com/chsword/archive/2008/03/10/dotnetmvcframework.html" target="_blank">Asp.net Mvc Framework 系列</a></p>
<p><a href="http://www.cnblogs.com/chsword/archive/2008/09/29/aspnetmvc_video.html" target="_blank">Asp.net Mvc 入门视频教程（试水）</a></p>
<p><a href="http://www.cnblogs.com/JeffreyZhao/" target="_blank">老赵</a>的视频教程：<a href="http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/Series/MVC.aspx" target="_blank">http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/Series/MVC.aspx</a></p>
<p><a title="http://www.cnblogs.com/zhangziqiu/category/177895.html" href="http://www.cnblogs.com/zhangziqiu/category/177895.html" target="_blank">从零开始学习ASP.NET MVC</a>(未完) by <a href="http://www.cnblogs.com/zhangziqiu/">ziqiu.zhang</a></p>
<p>如果你英文比较好的话，可以直接到<a href="http://www.asp.net/mvc/" target="_blank">ASP.NET MVC 官网</a>上看，上面有入门教程.</p>
<p>一些ASP.NET MVC可用的模板引擎：</p>
<div>
<ul>
    <li><a href="http://mvccontrib.codeplex.com/Wiki/View.aspx?title=Brail&amp;referringTitle=Documentation">Brail</a></li>
    <li><a href="http://mvccontrib.codeplex.com/Wiki/View.aspx?title=NHaml&amp;referringTitle=Documentation">NHaml</a></li>
    <li><a href="http://mvccontrib.codeplex.com/Wiki/View.aspx?title=NVelocity&amp;referringTitle=Documentation">NVelocity</a></li>
    <li><a href="http://mvccontrib.codeplex.com/Wiki/View.aspx?title=XSLT&amp;referringTitle=Documentation">XSLT</a></li>
</ul>
<p>上面的4个都包括在<a href="http://mvccontrib.com/">MVC Contrib</a>中了</p>
<p>还有我比较喜欢的一个：<a title="http://dev.dejardin.org/" href="http://dev.dejardin.org/" target="_blank">Spark</a></p>
<p>一个用于ASP.NET MVC的业务实体验证的开源项目：<a title="xVal" href="http://xval.codeplex.com/" target="_blank">xVal</a>，介绍见<a href="http://blog.codeville.net/2009/01/10/xval-a-validation-framework-for-aspnet-mvc/">xVal - a validation framework for ASP.NET MVC</a>、<a href="http://blog.codeville.net/2009/02/27/xval-08-beta-now-released/">xVal 0.8 (Beta) Now Released</a>。</p>
</div>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=209</link>
			<title><![CDATA[ASP到底怎么连接MYSQL数据库？]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Sun,10 Aug 2008 12:52:47 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=209</guid>
		<description><![CDATA[<p>昨天，搞了一个应用，用ASP连接MYSQL，不会呀，怎么办，有搜索引擎呢，这一搜，满屏的复制品，随便找了一个，一测试就出错。代码如下：</p>
<p><br /><em>sqlstr=&quot;driver={mysql odbc 3.51 driver};database=sg_bbs;server=localhost;uid=root;password=123456;&quot;'无需配置dsn<br />set conn = server.createobject(&quot;adodb.connection&quot;) <br />conn.open sqlstr<br /></em></p>
<p><strong>出错提示如下：</strong></p>
<p><em>Microsoft OLE DB Provider for ODBC Drivers<font face="宋体, MS Song" size="3"> </font><font face="宋体" size="2">错误 '80004005'</font><font face="宋体, MS Song" size="3"> </font></em></p>
<p><font face="宋体" size="2"><em>[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序</em></font> </p>
<p>这时我郁闷了，要到底怎么联呢？有知道的告诉老夫，哈哈。</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=167</link>
			<title><![CDATA[在win2k3,winXP上安装vs2005　SP1出错时的解决之道]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Mon,07 Apr 2008 04:50:32 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=167</guid>
		<description><![CDATA[<p>　　今天帮朋友修改一个.NET的程序，不得己装上了硕大无比的<strong>VS2005</strong>，打开项目时一直出错。估计是因为没有打<strong>SP1</strong>补丁的事吧。。赶快打补丁。本来SP1安装就需要很长时间，不巧的是老是快要走完的时候，却提示我xxx.数字签名，晕死。重新装。涛声依旧。赶快查<a href="http://www.baidu.com/">百度</a>,原来是需要设置的。。</p>
<p>问题截图：</p>
<p><img alt="" src="http://www.haixiait.com/attachments/month_0804/52008474421.jpg" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>查到微软的官方说明是：</p>
<p>　　尝试在 Windows Server 2003 或 Windows XP 中安装大型 Windows Installer 程序包或大型 Windows Installer 修补程序包时出现错误消息：&ldquo;Error 1718. File was rejected by digital signature policy&rdquo;（错误 1718。文件被数字签名策略拒绝）</p>
<h2 class="subTitle" id="tocHeadRef">
<h2 class="subTitle" id="tocHeadRef"><span class="Title">
<h2 class="subTitle" id="tocHeadRef"><font size="3">症状</font></h2>
</span><script type="text/javascript">loadTOCNode(1, 'symptoms');</script></h2>
</h2>
<div class="sbody">尝试在运行 Microsoft Windows Server 2003 或 Microsoft Windows XP 的计算机上安装大型 Microsoft Windows Installer (.msi) 程序包或大型 Microsoft Windows Installer 修补程序 (.msp) 包时，将收到以下错误消息：
<div class="errormsg">错误 1718。文件 <var>FileName</var> 被数字签名策略拒绝。</div>
</div>
<h2 class="subTitle" id="tocHeadRef"><span class="Title"><font size="3">原因</font></span></h2>
<script type="text/javascript">loadTOCNode(1, 'cause');</script>
<div class="sbody">当计算机没有足够的连续内存可供 Windows Server 2003 或 Windows XP 用于验证是否对 .msi 包或 .msp 包正确进行了签名时将出现此问题。</div>
<div class="sbody">&nbsp;</div>
<div class="sbody">
<h2 class="subTitle" id="tocHeadRef"><span class="Title"><font size="3">替代方法</font></span></h2>
<script type="text/javascript">loadTOCNode(1, 'workaround');</script>
<div class="sbody"><b>警告</b>：如果使用注册表编辑器或其他方法错误地修改了注册表，则可能会出现严重问题。这些问题可能需要重新安装操作系统才能解决。Microsoft 不能保证可以解决这些问题。修改注册表需要您自担风险。<br />
<br />
要解决此问题，请在尝试安装程序包之前将 PolicyScope 注册表值更改为 1。为此，请按照下列步骤操作。<br />
<br />
<b>注意</b>：如果将计算机加入到域中，则域策略更新可能会覆盖您对注册表所做的更改。强烈建议在执行以下步骤之前从域中断开计算机。</div>
<div class="sbody">
<table class="list ol">
    <tbody>
        <tr>
            <td class="number">1.</td>
            <td class="text">依次单击&ldquo;开始&rdquo;和&ldquo;运行&rdquo;，键入 <span class="userInput">regedit</span>，然后单击&ldquo;确定&rdquo;。</td>
        </tr>
        <tr>
            <td class="number">2.</td>
            <td class="text">在注册表编辑器中，找到并单击下面的注册表项：
            <div class="indent">HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Safer\CodeIdentifiers<br />
            <br />
            <b>注意</b>：在修改此注册表项之前，建议先备份此注册表项。为此，右键单击&ldquo;CodeIdentifiers&rdquo;，然后单击&ldquo;导出&rdquo;。将文件保存到可在计算机上找到此文件的位置中。</div>
            </td>
        </tr>
        <tr>
            <td class="number">3.</td>
            <td class="text">更改 PolicyScope 的注册表值。为此，请双击&ldquo;PolicyScope&rdquo;，然后将设置从 0 更改为 1。</td>
        </tr>
        <tr>
            <td class="number">4.</td>
            <td class="text">关闭注册表编辑器。</td>
        </tr>
        <tr>
            <td class="number">5.</td>
            <td class="text">依次单击&ldquo;开始&rdquo;、&ldquo;运行&rdquo;，键入 <span class="userInput">cmd</span>，然后单击&ldquo;确定&rdquo;以打开命令提示符窗口。</td>
        </tr>
        <tr>
            <td class="number">6.</td>
            <td class="text">在命令提示符下，键入以下命令并按 Enter：
            <div class="indent"><span class="userInput">net stop msiserver</span></div>
            如果 Windows Installer 服务当前正在后台运行，则此命令将停止该服务。该服务停止后，请关闭命令提示符窗口，然后转到步骤 7。<br />
            <br />
            <b>注意</b>：如果在命令提示符处收到以下消息，请关闭命令提示符窗口，然后转到步骤 7：
            <div class="message">未启动 Windows Installer 服务</div>
            </td>
        </tr>
        <tr>
            <td class="number">7.</td>
            <td class="text">收到&ldquo;症状&rdquo;部分所述的错误消息后，请安装要尝试安装的程序包。</td>
        </tr>
        <tr>
            <td class="number">8.</td>
            <td class="text">安装了程序包之后，重复步骤 1 和 2。然后，将 PolicyScope 注册表值更改回 0。</td>
        </tr>
        <tr>
            <td class="number">9.</td>
            <td class="text">
            <p>如果从域中断开了计算机，请重新加入域，然后重新启动计算机。<br />
            <br />
            <b>注意</b>：如果未从域中断开计算机，则不必重新启动计算机。</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            </td>
        </tr>
    </tbody>
</table>
</div>
<div class="sbody"><strong><font color="#0000ff">如果以上步骤不能解决该问题，请按照下列步骤操作：</font></strong> （<font color="#ff0000">建议直接也用此方法增加安装的成功率，经验啊～～～</font>）</div>
<div class="sbody">&nbsp;</div>
<div class="sbody">
<table class="list ol">
    <tbody>
        <tr>
            <td class="number">1.</td>
            <td class="text">单击&ldquo;开始&rdquo;，单击&ldquo;运行&rdquo;，键入 <span class="userInput">control admintools</span>，然后单击&ldquo;确定&rdquo;。</td>
        </tr>
        <tr>
            <td class="number">2.</td>
            <td class="text">双击&ldquo;本地安全策略&rdquo;。</td>
        </tr>
        <tr>
            <td class="number">3.</td>
            <td class="text">单击&ldquo;软件限制策略&rdquo;。<br />
            <br />
            <b>注意</b>：如果未列出软件限制，请右击&ldquo;软件限制策略&rdquo;，然后单击&ldquo;新建策略&rdquo;。</td>
        </tr>
        <tr>
            <td class="number">4.</td>
            <td class="text">在&ldquo;对象类型&rdquo;下，双击&ldquo;强制&rdquo;。</td>
        </tr>
        <tr>
            <td class="number">5.</td>
            <td class="text">单击&ldquo;除本地管理员以外的所有用户&rdquo;，然后单击&ldquo;确定&rdquo;。</td>
        </tr>
        <tr>
            <td class="number">6.</td>
            <td class="text">重新启动计算机。</td>
        </tr>
    </tbody>
</table>
</div>
<div class="sbody"><b>重要说明</b>：在按照以上步骤操作后，本地管理员就可以安装 .msi 包或 .msp 包。安装了程序包之后，请按照以上步骤重置强制级别。在步骤 5 中，单击&ldquo;所有用户&rdquo;而不是单击&ldquo;除本地管理员以外的所有用户&rdquo;。</div>
<div class="sbody">&nbsp;</div>
<div class="sbody"><strong><font color="#ff0000"><a href="http://www.haixiaIT.com">airzen</a>友情提示：最关键的是修改完注册表之后，一定要记得重启您的计算机。。这样才会配置生效</font></strong></div>
</div>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=102</link>
			<title><![CDATA[ASP.NET 两个日期型数据的天数差]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Fri,07 Dec 2007 17:41:02 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=102</guid>
		<description><![CDATA[<p><font color="#0000ff"><strong>ASP.NET 两个日期型数据的天数差</strong></font></p>
<p><strong>(C#)</strong></p>
<p>TimeSpan ts = info.ENDTIME - info.STARTTIME ;<br />info.Days =&nbsp; ts.Days;//借调期限</p>
<p><strong>(VB.NET)</strong></p>
<p>DateDiff(&quot;n&quot;,日期型变量1,日期型变量2)</p>
<p>&nbsp;</p>
<p>网上找了好久,都是VB的,现贴上来与大家分享</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=81</link>
			<title><![CDATA[[ASP]正则表达式只取出HTML中文本解决方法]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Fri,23 Nov 2007 00:10:25 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=81</guid>
		<description><![CDATA[<p>已经有很长时间没有再写ASP程序了，今天来到leadbbs看到以前我的一个贴，感觉还很不错，所以就贴了上来与大家一起分享，是ASP的，可能以后也不会有更多的ASP技巧给大家分享，所以此贴就放在ASP.NET下面了。主要功能如题</p>
<p>如：</p>
<p>现有一段HTML <br />&lt;a href=http://www.baidu.com/&gt;百度&lt;/a&gt; &lt;a href=http://www.haixiaIT.com/&gt;海峡IT网&lt;/a&gt;</p>
<p>想得到 结果是 [百度 海峡IT网]</p>
<p>即,只取出其中的文本.</p>
<p>如下代码实现</p>
<p><span style="FONT-SIZE: 14px"><span id="Content2265332">&nbsp;&nbsp;&nbsp;&nbsp;Public Function FilterHtml(str)<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;Dim regEx<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;'创建正则对象<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;Set regEx = New RegExp<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;regEx.IgnoreCase = True<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;regEx.Global = True<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;regEx.MultiLine = True<br /><br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;regEx.Pattern = &quot;&lt;.+?&gt;&quot;<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;FilterHtml = regEx.Replace(str,&quot;&quot;)<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;Set regEx = Nothing<br />&nbsp; &nbsp; End Function</span></span></p>
<p><span style="FONT-SIZE: 14px"><span>主要是利用了正则，感觉很爽。airzen与大家分享。</span></span></p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=62</link>
			<title><![CDATA[自动输出页面执行时间的.NET页面基类]]></title>
			<author>airzen@126.com(airzen)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Thu,15 Nov 2007 09:11:53 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=62</guid>
		<description><![CDATA[<p>namespace Web<br />{&nbsp;public class BasePage : System.Web.UI.Page<br />&nbsp;{<br />&nbsp;&nbsp;private long ProgramBeginRunTime;<br />&nbsp;&nbsp;private long programRunTime;</p>
<p>&nbsp;&nbsp;public BasePage()<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;this.ProgramBeginRunTime = System.Environment.TickCount;&nbsp;//程序开始运行时间<br />&nbsp;&nbsp;}</p>
<p><br />&nbsp;&nbsp;/// &lt;summary&gt;<br />&nbsp;&nbsp;/// 填充页面上显示程序运行时间的文本控件<br />&nbsp;&nbsp;/// &lt;/summary&gt;<br />&nbsp;&nbsp;/// &lt;param name=&quot;literal&quot;&gt;显示程序运行时间的文本控件&lt;/param&gt;<br />&nbsp;&nbsp;private void ProgramRunTime()<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;long ProgramEndRunTime = System.Environment.TickCount;<br />&nbsp;&nbsp;&nbsp;programRunTime = ProgramEndRunTime - this.ProgramBeginRunTime;<br />&nbsp;&nbsp;&nbsp;System.Web.UI.LiteralControl literal = new System.Web.UI.LiteralControl( &quot;&lt;!-- 程序运行时间 &quot; + programRunTime.ToString() + &quot; 毫秒 --&gt;&quot; );<br />&nbsp;&nbsp;&nbsp;this.Page.Controls.Add( literal );&nbsp;//添加到页面末尾<br />&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;protected override void Render(System.Web.UI.HtmlTextWriter writer)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;this.ProgramRunTime();<br />&nbsp;&nbsp;&nbsp;base.Render (writer);<br />&nbsp;&nbsp;}</p>
<p><br />&nbsp;&nbsp;/// &lt;summary&gt;<br />&nbsp;&nbsp;/// 验证用户是否登陆或登陆超时，重载二<br />&nbsp;&nbsp;/// &lt;/summary&gt;<br />&nbsp;&nbsp;/// &lt;param name=&quot;session&quot;&gt;&lt;/param&gt;<br />&nbsp;&nbsp;public void ValidateLogin( object session )<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;if( session == null )<br />&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;Response.Write( &quot;&lt;script language='javascript'&gt;window.location.href='/Error.aspx?errorId=1'&lt;/script&gt;&quot; );<br />&nbsp;&nbsp;&nbsp;&nbsp;Response.End();<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}</p>
<p>&nbsp;</p>
<p>&nbsp;}<br />}</p>
<p>&nbsp;</p>
<p>使用时只需直接继承该类即可,所有aspx页面底部会自动输出页面处理时间.附加到HTML流最后一行</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=56</link>
			<title><![CDATA[asp.net第三方控件消息控件popupwin.dll]]></title>
			<author>airzen@126.com(caixiebin)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Wed,14 Nov 2007 09:44:36 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=56</guid>
		<description><![CDATA[<p><font color="#ff0000"><a href="http://www.haixiait.com/attachments/month_0711/02007111494612.zip"><img style="MARGIN: 0px 2px -4px 0px" alt="" src="http://www.haixiait.com/images/download.gif" border="0" />点击下载此文件</a></font><font color="#ff0000"><br />目前网上很多地方都没有提供popupwin.dll下载，本人抽了点时间在一个国外的网站上注册并下载了第三方的MSN消息控件popupwin.dll。</font></p>
<p>下面我介绍这个控件的一些使用方法。</p>
<p align="left">　　首先，在该控件中，有两种事件可以被激发：Linkcliked事件（当消息框内的连接被点击时触发）和Popupclosed事件（当消息框窗口被关闭时触发）。控件有三种方式对这些事件进行处理，而actiontype属性的取值，则决定了这三种方式：</p>
<p align="left">　　1)messagewindow(默认)：默认的弹出窗口方式，将以设置好的Title属性和Text属性为标题和窗口内的文字说明。</p>
<p align="left">　　2)openlink:此时，控件允许当点击窗口内的文字链接时，将以打开新窗口的方式打开该链接。</p>
<p align="left">　　3)raiseevenst:当选择该属性时，控件将会在服务端处理linkcliked事件和popupclosed事件。</p>
<p align="left">　　在使用该控件时是十分方便的，只需要在visual studio .net 中，使用add/remove toolbox功能，选择该控件的dll,之后，该控件就会出现在工具箱中，就可以拖拉的方式放到网页中去应用。</p>
<p align="left">　　单击该控件，在其设计器中，会发现有丰富的属性（详细的属性，事件说明请参考该控件的文档）。在设计器中的'操作'分类栏中，可以指定控件如何处理当用户关闭窗口和点击窗口内的文字时打开的新链接；在'文字'和'设计'分类栏中，将可以设计弹出消息窗口的字体，颜色，布局（如设置是从左下角还是从右下角弹出）；在'行为'分类栏中，可以设置窗口弹出的弹出速度，是否自动在页面加载后就弹出，以及窗口在弹出多久后会自动关闭，窗口是否可以设置为自由拖拉等等。</p>
<p align="left">&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
<p align="left">用下面的的代码，可以重新设置已经弹出过的消息窗口的标题文字，并让其再次弹出：＜!-- Anchor.aspx --＞<br />＜%@ Register TagPrefix='cc1' Namespace='EeekSoft.Web' Assembly='EeekSoft.Web.PopupWin' %＞＜cc1:popupwin id='popupWin' runat='server' visible='False' <br />　　　colorstyle='Blue' width='230px' height='100px' dockmode='BottomLeft' <br />　　　windowscroll='False' windowsize='300, 200'＞<br />＜/cc1:popupwin＞＜cc1:popupwinanchor id='popupAnchor' runat='server' changetexts='False'＞＜/cc1:popupwinanchor＞＜span id='spanreopen'＞ Click here to reopen popup !＜/span＞ 　　code-behind文件中的代码如下：// Anchor.aspx.cs<br />// Handle onclick event ..<br />//设置其响应的事件为onclick<br />popupAnchor.HandledEvent='onclick';popupAnchor.LinkedControl='spanReopen';<br />popupAnchor.PopupToShow='popupWin';<br />popupWin.Visible=true;<br />popupWin.AutoShow=true; 　　则上面的代码可以实现，当点击spanreopen区域时，可以使已经弹出的消息窗口再次弹出。</p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=43</link>
			<title><![CDATA[在ASP.NET AJAX中别使用mode=&#34;Legacy&#34;]]></title>
			<author>airzen@126.com(admin)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Fri,09 Nov 2007 08:40:20 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=43</guid>
		<description><![CDATA[<p>&nbsp;最近，我帮过几个开发人员，他们遇上了一些古怪的javascript问题，这些问题会在使用ASP.NET AJAX 以及他们的一些自定义的JavaScript脚本时出现。问题的主因在于，他们是把VS 2003 Web项目自动移植到VS 2005的，在他们的web.config文件中还配置有 &lt;xhtmlConformance mode=&quot;Legacy&quot;/&gt; 。 <br />　　假如你在你的 web 应用中编写了自定义的客户端JavaScript脚本，而且将使用AJAX的话，请读下去，了解如何避免这个常见的疑难杂症。</p>
<p>　　症状： </p>
<p>　　当你往先前成功地从VS 2003 升级到VS 2005的项目中添加新的客户端JavaScript脚本时，你会看到奇怪的行为。在使用ASP.NET AJAX UpdatePanel 控件时，这个奇怪的行为有时会包括页面做整页 postback，而不仅是递增性的局部更新的情形。 </p>
<p>　　当你打开你的web.config文件，你会看到其中的 &lt;xhtmlConformance/&gt; 元素，象这样： </p>
<p>&lt;configuration&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;system.web&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xhtmlConformance mode=&quot;Legacy&quot; /&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/system.web&gt;</p>
<p>&lt;/configuration&gt; <br />　　背景：</p>
<p>　　ASP.NET 1.0 和 1.1 中的许多服务器端控件并不输出与XHTML兼容的标识。ASP.NET 2.0 对此做了改变，在默认情形下，所有的服务器端控件都会输出与XHTML兼容的标识 。</p>
<p>　　但在早期的ASP.NET 2.0 beta 中我们注意到的一件事情是，当把客户应用升级时，其实，很多应用会假设页面输出并不是与XHTML兼容的。把我们服务器控件的默认输出改成与XHTML兼容的话，它有时会修改页面的视觉显示。为向后兼容的目的，我们添加了上面这个 &lt;xhtmlConformance&gt; 设置，允许开发人员可以设置控件以Legacy模式(即与ASP.NET 1.1一样，会输出非XHTML标识)，或者Transitional 模式 (XHTML Transitional) ，或者 Strict 模式 (XHTML Strict)显示。</p>
<p>　　在默认情形下，当你使用VS 2003升级到VS 2005的Web项目移植向导时(无论是网站或 web 应用项目)，你的web.config文件里会添有这个legacy配置。</p>
<p>　　解决方案：</p>
<p>　　除非你已知当你的网站以XHTML模式运行时会有问题(但你还没时间更正)，我总是建议从你的web.config文件里去掉 &lt;xhtmlConformance&gt; 这部分，或者你也可以明确地将其设置为Transitional 或 Strict。 </p>
<p>　　这将使得你的HTML输出是符合标准的，此外，这也将导致你的服务器控件的HTML输出是well formed，即， 开始标签和结束标签总是相匹配的。当你使用AJAX技术来动态替换你的页面上某些HTML元素的内容时，这尤其重要，否则的话，客户端JavaScript脚本有时会搞不清楚容器元素，导致出错。它也将确保ASP.NET AJAX会在你的网站上正常工作。<br /></p>]]></description>
		</item>
		
			<item>
			<link>http://www.haixiait.com/article.asp?id=7</link>
			<title><![CDATA[在asp.net中获得某月的天数 ]]></title>
			<author>airzen@126.com(admin)</author>
			<category><![CDATA[Asp.Net]]></category>
			<pubDate>Wed,01 Aug 2007 11:03:48 +0800</pubDate>
			<guid>http://www.haixiait.com/default.asp?id=7</guid>
		<description><![CDATA[<strong><font color="#0000ff">在asp.net中获得某月的天数<br /></font></strong>DateTime.DaysInMonth(2007,08)
<p><font color="#0000ff">取出当前年、月的天数</font>&nbsp;&nbsp; <br />&nbsp; DateTime.DaysInMonth(DateTime.Now.Year,DateTime.Now.Month);<br />int&nbsp;&nbsp; tianshu=DateTime.DaysInMonth(DateTime.Today.Year,DateTime.Today.Month);</p>
<p>资料收集整理by airzen 20070801</p>
<p><a href="http://blog.csdn.net/airzen">http://blog.csdn.net/airzen</a></p>
<p><a href="http://www.haixiaIT.com">http://www.haixiaIT.com</a></p>
<p><font color="#0000ff"><strong>--附相关SDK文档----------------------------------------------------------------------------</strong></font></p>
<p>DateTime.DaysInMonth 方法</p>
<p>返回指定年份中指定月份的天数。</p>
<p>[C#]<br />public static int DaysInMonth(<br />&nbsp;&nbsp; int year,<br />&nbsp;&nbsp; int month<br />);</p>
<p>[C++]<br />public: static int DaysInMonth(<br />&nbsp;&nbsp; int year,<br />&nbsp;&nbsp; int month<br />);</p>
<p>[JScript]<br />public static function DaysInMonth(<br />&nbsp;&nbsp; year : int,<br />&nbsp;&nbsp; month : int<br />) : int;</p>
<p>参数<br />year <br />年份。 <br />month <br />月份（介于 1 到 12 之间的一个数字）。 <br />返回值<br />指定 year 中 month 的天数。</p>
<p>例如，如果 month 等于 2（表示二月），则返回值为 28 或 29，具体取决于 year 是否为闰年。</p>
<p>异常<br />异常类型 条件 <br />ArgumentOutOfRangeException month 小于 1 或大于 12。 </p>
<p>示例<br />[Visual Basic, C#, C++] 下面的示例说明 DaysInMonth 方法。</p>
<p>[Visual Basic] <br />Const July As Integer = 7<br />Const Feb As Integer = 2</p>
<p>' daysInJuly gets 31.<br />Dim daysInJuly As Integer = System.DateTime.DaysInMonth(2001, July)</p>
<p>' daysInFeb gets 28 because the year 1998 was not a leap year.<br />Dim daysInFeb As Integer = System.DateTime.DaysInMonth(1998, Feb)</p>
<p>' daysInFebLeap gets 29 because the year 1996 was a leap year.<br />Dim daysInFebLeap As Integer = System.DateTime.DaysInMonth(1996, Feb)</p>
<p>[C#] <br />const int July = 7;<br />const int Feb = 2;</p>
<p>// daysInJuly gets 31.<br />int daysInJuly = System.DateTime.DaysInMonth(2001, July);</p>
<p>// daysInFeb gets 28 because the year 1998 was not a leap year.<br />int daysInFeb = System.DateTime.DaysInMonth(1998, Feb);</p>
<p>// daysInFebLeap gets 29 because the year 1996 was a leap year.<br />int daysInFebLeap = System.DateTime.DaysInMonth(1996, Feb);</p>]]></description>
		</item>
		
</channel>
</rss>







