<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/lemonhall" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/lemonhall" type="application/rss+xml"></fs:self_link><lastBuildDate>Mon, 17 May 2010 02:47:46 GMT</lastBuildDate><title>狗狗的日记本本</title><description>Just another My.donews.com weblog</description><link>http://my.donews.com/lemonhall</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Mon, 17 May 2010 02:47:46 GMT</pubDate><item><title>FirstDayOfMonth by ExtendMethod, C#</title><link>http://my.donews.com/lemonhall/2010/05/17/firstdayofmonth-by-extendmethod-c/</link><content:encoded>&lt;p&gt;DateTime date = new DateTime(2010, 1, 1);&lt;br /&gt;
DateTime first= date.FirstDayOfMonth();&lt;br /&gt;
DateTime last= date.LastDayOfMonth();&lt;/p&gt;
&lt;p&gt;==============================================&lt;br /&gt;
    public static class ExtendMethod {&lt;/p&gt;
&lt;p&gt;        public static DateTime FirstDayOfMonth(this DateTime dateTime)&lt;br /&gt;
        {&lt;br /&gt;
            return new DateTime(dateTime.Year, dateTime.Month, 1);&lt;br /&gt;
        }&lt;/p&gt;
&lt;p&gt;        public static DateTime LastDayOfMonth(this DateTime dateTime)&lt;br /&gt;
        {&lt;br /&gt;
            DateTime firstDayOfTheMonth = new DateTime(dateTime.Year, dateTime.Month, 1);&lt;br /&gt;
            return firstDayOfTheMonth.AddMonths(1).AddDays(-1);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/367236332/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/17/firstdayofmonth-by-extendmethod-c/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236332/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236332/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://my.donews.com/lemonhall/2010/05/17/firstdayofmonth-by-extendmethod-c/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>DateTime date = new DateTime(2010, 1, 1);
DateTime first= date.FirstDayOfMonth();
DateTime last= date.LastDayOfMonth();
==============================================
    public static class ExtendMethod {
        public static DateTime FirstDayOfMonth(this DateTime dateTime)
        {
            return new DateTime(dateTime.Year, dateTime.Month, [...]&lt;img src=&quot;http://www1.feedsky.com/t1/367236332/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/17/firstdayofmonth-by-extendmethod-c/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236332/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236332/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>43</category><pubDate>Mon, 17 May 2010 10:47:46 +0800</pubDate><author>lemonhall</author><comments>http://my.donews.com/lemonhall/2010/05/17/firstdayofmonth-by-extendmethod-c/#comments</comments><guid isPermaLink="false">http://my.donews.com/lemonhall/?p=534</guid><dc:creator>lemonhall</dc:creator><fs:srclink>http://my.donews.com/lemonhall/2010/05/17/firstdayofmonth-by-extendmethod-c/</fs:srclink><fs:srcfeed>http://my.donews.com/lemonhall/feed/</fs:srcfeed><fs:itemid>feedsky/lemonhall/~1230063/367236332/1232585</fs:itemid></item><item><title>Jquery 与 Updatepanel兼容方案</title><link>http://my.donews.com/lemonhall/2010/05/06/jquery-%e4%b8%8e-updatepanel%e5%85%bc%e5%ae%b9%e6%96%b9%e6%a1%88/</link><content:encoded>&lt;p&gt;【解决方案】&lt;/p&gt;
&lt;p&gt;我们可以将ready事件中执行的代码提取出来，然后通过捕获ScriptManager的EndRequest事件，在每次UpdatePanel局部刷新之后执行一次jQuery初始化代码，如下所示：&lt;/p&gt;
&lt;p&gt;        function load() {&lt;br /&gt;
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);&lt;br /&gt;
        }&lt;/p&gt;
&lt;p&gt;        function EndRequestHandler() {&lt;br /&gt;
            ReadyFunction1();&lt;br /&gt;
            ReadyFunction2();&lt;br /&gt;
            ReadyFunction3();&lt;br /&gt;
        }&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/367236333/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/06/jquery-%e4%b8%8e-updatepanel%e5%85%bc%e5%ae%b9%e6%96%b9%e6%a1%88/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236333/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236333/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://my.donews.com/lemonhall/2010/05/06/jquery-%e4%b8%8e-updatepanel%e5%85%bc%e5%ae%b9%e6%96%b9%e6%a1%88/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>【解决方案】
我们可以将ready事件中执行的代码提取出来，然后通过捕获ScriptManager的EndRequest事件，在每次UpdatePanel局部刷新之后执行一次jQuery初始化代码，如下所示：
        function load() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }
        function EndRequestHandler() {
            ReadyFunction1();
   [...]&lt;img src=&quot;http://www1.feedsky.com/t1/367236333/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/06/jquery-%e4%b8%8e-updatepanel%e5%85%bc%e5%ae%b9%e6%96%b9%e6%a1%88/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236333/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236333/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>43</category><pubDate>Thu, 06 May 2010 20:32:24 +0800</pubDate><author>lemonhall</author><comments>http://my.donews.com/lemonhall/2010/05/06/jquery-%e4%b8%8e-updatepanel%e5%85%bc%e5%ae%b9%e6%96%b9%e6%a1%88/#comments</comments><guid isPermaLink="false">http://my.donews.com/lemonhall/?p=532</guid><dc:creator>lemonhall</dc:creator><fs:srclink>http://my.donews.com/lemonhall/2010/05/06/jquery-%e4%b8%8e-updatepanel%e5%85%bc%e5%ae%b9%e6%96%b9%e6%a1%88/</fs:srclink><fs:srcfeed>http://my.donews.com/lemonhall/feed/</fs:srcfeed><fs:itemid>feedsky/lemonhall/~1230063/367236333/1232585</fs:itemid></item><item><title>ClearBox加updatepanel实现无刷新数据更新</title><link>http://my.donews.com/lemonhall/2010/05/06/clearbox%e5%8a%a0updatepanel%e5%ae%9e%e7%8e%b0%e6%97%a0%e5%88%b7%e6%96%b0%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96%b0/</link><content:encoded>&lt;p&gt;【目的】最小编程量实现页面部分刷新，并结合CLEARBOX实现多窗口，关闭后回调刷新。&lt;/p&gt;
&lt;p&gt;====================================================&lt;br /&gt;
第一步：&lt;/p&gt;
&lt;p&gt;     【SQLDATASOURCE】和一个【GRIDVIEW】&lt;/p&gt;
&lt;p&gt;=====================================================&lt;/p&gt;
&lt;p&gt;第二步：&lt;/p&gt;
&lt;p&gt;加入一个隐形的按钮，并加入后端代码刷新GRIDVIEW：&lt;br /&gt;
        protected void button_Click(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            GridView1.DataSourceID = &amp;#8220;SqlDataSource2&amp;#8243;;&lt;br /&gt;
            GridView1.DataBind();&lt;br /&gt;
        }&lt;/p&gt;
&lt;p&gt;====================================================&lt;/p&gt;
&lt;p&gt;第三步：&lt;/p&gt;
&lt;p&gt;注册CLEARBOX的关闭事件：&lt;br /&gt;
CB_AllowExtFunctCBClose=&amp;#8217;on&amp;#8217;；【cb_config.js文件】&lt;/p&gt;
&lt;p&gt;====================================================&lt;br /&gt;
第四步：&lt;/p&gt;
&lt;p&gt;    function CB_ExternalFunctionCBClose() {&lt;br /&gt;
        __doPostBack(&amp;#8220;&amp;#8221;, &amp;#8220;&amp;#8221;);&lt;br /&gt;
    }        &lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/367236334/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/06/clearbox%e5%8a%a0updatepanel%e5%ae%9e%e7%8e%b0%e6%97%a0%e5%88%b7%e6%96%b0%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96%b0/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236334/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236334/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://my.donews.com/lemonhall/2010/05/06/clearbox%e5%8a%a0updatepanel%e5%ae%9e%e7%8e%b0%e6%97%a0%e5%88%b7%e6%96%b0%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96%b0/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>【目的】最小编程量实现页面部分刷新，并结合CLEARBOX实现多窗口，关闭后回调刷新。
====================================================
第一步：
     【SQLDATASOURCE】和一个【GRIDVIEW】
=====================================================
第二步：
加入一个隐形的按钮，并加入后端代码刷新GRIDVIEW：
        protected void button_Click(object sender, EventArgs e)
        {
            GridView1.DataSourceID = &amp;#8220;SqlDataSource2&amp;#8243;;
            GridView1.DataBind();
   [...]&lt;img src=&quot;http://www1.feedsky.com/t1/367236334/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/06/clearbox%e5%8a%a0updatepanel%e5%ae%9e%e7%8e%b0%e6%97%a0%e5%88%b7%e6%96%b0%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96%b0/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236334/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236334/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>43</category><pubDate>Thu, 06 May 2010 20:31:53 +0800</pubDate><author>lemonhall</author><comments>http://my.donews.com/lemonhall/2010/05/06/clearbox%e5%8a%a0updatepanel%e5%ae%9e%e7%8e%b0%e6%97%a0%e5%88%b7%e6%96%b0%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96%b0/#comments</comments><guid isPermaLink="false">http://my.donews.com/lemonhall/?p=530</guid><dc:creator>lemonhall</dc:creator><fs:srclink>http://my.donews.com/lemonhall/2010/05/06/clearbox%e5%8a%a0updatepanel%e5%ae%9e%e7%8e%b0%e6%97%a0%e5%88%b7%e6%96%b0%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%96%b0/</fs:srclink><fs:srcfeed>http://my.donews.com/lemonhall/feed/</fs:srcfeed><fs:itemid>feedsky/lemonhall/~1230063/367236334/1232585</fs:itemid></item><item><title>doubanclaimd74eb9533ed74bdd</title><link>http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/</link><content:encoded>&lt;img src=&quot;http://www1.feedsky.com/t1/367236335/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236335/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236335/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>&lt;img src=&quot;http://www1.feedsky.com/t1/367236335/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236335/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236335/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>43</category><pubDate>Tue, 04 May 2010 10:23:00 +0800</pubDate><author>lemonhall</author><comments>http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/#comments</comments><guid isPermaLink="false">http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/</guid><dc:creator>lemonhall</dc:creator><fs:srclink>http://my.donews.com/lemonhall/2010/05/04/doubanclaimd74eb9533ed74bdd/</fs:srclink><fs:srcfeed>http://my.donews.com/lemonhall/feed/</fs:srcfeed><fs:itemid>feedsky/lemonhall/~1230063/367236335/1232585</fs:itemid></item><item><title>FIDDLER 调试 VS2008的ASP.NET出现本地主机阻止的解决方法</title><link>http://my.donews.com/lemonhall/2010/04/26/fiddler-%e8%b0%83%e8%af%95-vs2008%e7%9a%84asp-net%e5%87%ba%e7%8e%b0%e6%9c%ac%e5%9c%b0%e4%b8%bb%e6%9c%ba%e9%98%bb%e6%ad%a2%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/</link><content:encoded>&lt;p&gt;OPTIONS，关掉IPV6即可&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/367236336/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/04/26/fiddler-%e8%b0%83%e8%af%95-vs2008%e7%9a%84asp-net%e5%87%ba%e7%8e%b0%e6%9c%ac%e5%9c%b0%e4%b8%bb%e6%9c%ba%e9%98%bb%e6%ad%a2%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236336/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236336/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://my.donews.com/lemonhall/2010/04/26/fiddler-%e8%b0%83%e8%af%95-vs2008%e7%9a%84asp-net%e5%87%ba%e7%8e%b0%e6%9c%ac%e5%9c%b0%e4%b8%bb%e6%9c%ba%e9%98%bb%e6%ad%a2%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>OPTIONS，关掉IPV6即可&lt;img src=&quot;http://www1.feedsky.com/t1/367236336/lemonhall/feedsky/s.gif?r=http://my.donews.com/lemonhall/2010/04/26/fiddler-%e8%b0%83%e8%af%95-vs2008%e7%9a%84asp-net%e5%87%ba%e7%8e%b0%e6%9c%ac%e5%9c%b0%e4%b8%bb%e6%9c%ba%e9%98%bb%e6%ad%a2%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/lemonhall/367236336/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/lemonhall/367236336/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><category>43</category><pubDate>Mon, 26 Apr 2010 09:46:16 +0800</pubDate><author>lemonhall</author><comments>http://my.donews.com/lemonhall/2010/04/26/fiddler-%e8%b0%83%e8%af%95-vs2008%e7%9a%84asp-net%e5%87%ba%e7%8e%b0%e6%9c%ac%e5%9c%b0%e4%b8%bb%e6%9c%ba%e9%98%bb%e6%ad%a2%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/#comments</comments><guid isPermaLink="false">http://my.donews.com/lemonhall/?p=527</guid><dc:creator>lemonhall</dc:creator><fs:srclink>http://my.donews.com/lemonhall/2010/04/26/fiddler-%e8%b0%83%e8%af%95-vs2008%e7%9a%84asp-net%e5%87%ba%e7%8e%b0%e6%9c%ac%e5%9c%b0%e4%b8%bb%e6%9c%ba%e9%98%bb%e6%ad%a2%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/</fs:srclink><fs:srcfeed>http://my.donews.com/lemonhall/feed/</fs:srcfeed><fs:itemid>feedsky/lemonhall/~1230063/367236336/1232585</fs:itemid></item></channel></rss>
