﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-</title><link>http://www.cnblogs.com/lagger/</link><description /><language>zh-cn</language><lastBuildDate>Thu, 28 Aug 2008 09:38:57 GMT</lastBuildDate><pubDate>Thu, 28 Aug 2008 09:38:57 GMT</pubDate><ttl>60</ttl><item><title>青衣 ---马天宇</title><link>http://www.cnblogs.com/lagger/archive/2008/03/11/1100736.html</link><dc:creator>江闯</dc:creator><author>江闯</author><pubDate>Tue, 11 Mar 2008 08:28:00 GMT</pubDate><guid>http://www.cnblogs.com/lagger/archive/2008/03/11/1100736.html</guid><wfw:comment>http://www.cnblogs.com/lagger/comments/1100736.html</wfw:comment><comments>http://www.cnblogs.com/lagger/archive/2008/03/11/1100736.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnblogs.com/lagger/comments/commentRss/1100736.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lagger/services/trackbacks/1100736.html</trackback:ping><description><![CDATA[<font face="Verdana"><br />
</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------------------歌词<br />
<br />
<br />
每逢秋去冬来是人去花又别<br />
叹一声缘分不该如此难求<br />
所谓的爱与不爱相隔在哪般
<div style="left: 322px; width: 342px; position: absolute; top: 223px; height: 505px"><img height="378" alt="" src="http://www.cnblogs.com/images/cnblogs_com/lagger/W020080307423123941384.jpg" width="300" border="0" /><br />
<br />
马天宇----青衣<br />
<object codebase="http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" type="application/x-oleobject" height="200" standby="Loading Microsoft Windows Media Player components..." width="240" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param name="FileName" value="http://www.gnmp3.com/newmusic/all/shiting/song/5955d900/001654/364994051.mp3"   /><param name="autoStart" value="1"   /><param name="showControls" value="1"   /><embed name="MediaPlayer1" src="http://www.gnmp3.com/newmusic/all/shiting/song/5955d900/001654/364994051.mp3" autostart="1" showcontrols="1" width="240" height="20" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer"   ></embed>
</object><br />
<br />
<br />
</div>
<br />
为何会让你宁愿白头也守候<br />
时间已覆水难收<br />
弹诉哀愁泪不休<br />
梦碎后已难再回首<br />
<br />
弹琵琶又见当年镜前你梳头<br />
拨一首满花春秀<br />
今日月下再醉孤酒<br />
雨落枝头年复一年谁白发留<br />
让爱随相思入梦左右<br />
梦见我们还挽着手<br />
<br />
每逢秋去冬来是人去花又别<br />
叹一声缘分不该如此难求<br />
所谓的爱与不爱相隔在哪般<br />
为何会让你宁愿白头也守候<br />
时间已覆水难收<br />
弹诉哀愁泪不休<br />
梦碎后已难再回首<br />
<br />
弹琵琶又见当年镜前你梳头<br />
拨一首满花春秀<br />
今日月下再醉孤酒<br />
雨落枝头年复一年谁白发留<br />
让爱随相思入梦左右<br />
梦见我们还挽着手<br />
<br />
弹琵琶又见当年镜前你梳头<br />
拨一首满花春秀<br />
今日月下再醉孤酒<br />
雨落枝头年复一年谁白发留<br />
让爱随相思入梦左右<br />
梦见我们还挽着手<br /><img src ="http://www.cnblogs.com/lagger/aggbug/1100736.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41938/" target="_blank">[新闻]新学年开始 大学生适用的十大互联网应用</a>]]></description></item><item><title>初识linq</title><link>http://www.cnblogs.com/lagger/archive/2007/08/11/851877.html</link><dc:creator>江闯</dc:creator><author>江闯</author><pubDate>Sat, 11 Aug 2007 07:47:00 GMT</pubDate><guid>http://www.cnblogs.com/lagger/archive/2007/08/11/851877.html</guid><wfw:comment>http://www.cnblogs.com/lagger/comments/851877.html</wfw:comment><comments>http://www.cnblogs.com/lagger/archive/2007/08/11/851877.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/lagger/comments/commentRss/851877.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lagger/services/trackbacks/851877.html</trackback:ping><description><![CDATA[<p>不经意间在网上看到这样的代码:<br>var query = from item in languages<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orderby item<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; group item by item.Length into lengthGroups<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orderby lengthGroups.Key descending<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select lengthGroups<br>开始还以为为是写的sql语句，后来再次遇到才知是c#3.0中的新特性。下面简单介绍一下新种新的类似与sql语句的语法<br>1 什么是linq<br>liq 是Language Integrated Query 的缩写<br>回忆我们经常写过的sql语句 "select&nbsp; top 10* from&nbsp;news&nbsp; order by id asc&nbsp;" 之类的语句。linq 的出现 完全可以将我们熟悉的SQL中像"select","from","where"等语句,LINQ查询语法跟SQL查询语法很相识，除了先后顺序.可以在.NET Framework环境中顺利使用并且大大提高开发的效率。<br>LINQ 提供了一条更常规的途径即给 .Net Framework 添加一些可以应用于所有信息源（ all sources of information ）的具有多种用途（ general-purpose ）的语法查询特性（ query facilities ），这是比向开发语言和运行时（ runtime ）添加一些关系数据（ relational ）特性或者类似 XML 特性（ XML-specific ）更好的方式。这些语法特性就叫做 .NET Language Integrated Query (LINQ) 。<br>要想使用应先下载LinQ框架&nbsp;安装以后来体验一下这种新的语法<br>查询一个int 数组中小于5的数字，并按照大小顺序排列：<br><br></p>
<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">&nbsp;Program<br><img id=Codehighlighter1_15_301_Open_Image onclick="this.style.display='none'; Codehighlighter1_15_301_Open_Text.style.display='none'; Codehighlighter1_15_301_Closed_Image.style.display='inline'; Codehighlighter1_15_301_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_15_301_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_15_301_Closed_Text.style.display='none'; Codehighlighter1_15_301_Open_Image.style.display='inline'; Codehighlighter1_15_301_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_15_301_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_15_301_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">&nbsp;Main(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">[]&nbsp;args)<br><img id=Codehighlighter1_57_299_Open_Image onclick="this.style.display='none'; Codehighlighter1_57_299_Open_Text.style.display='none'; Codehighlighter1_57_299_Closed_Image.style.display='inline'; Codehighlighter1_57_299_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_57_299_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_57_299_Closed_Text.style.display='none'; Codehighlighter1_57_299_Open_Image.style.display='inline'; Codehighlighter1_57_299_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_57_299_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_57_299_Open_Text><span style="COLOR: #000000">{<br><img id=Codehighlighter1_89_117_Open_Image onclick="this.style.display='none'; Codehighlighter1_89_117_Open_Text.style.display='none'; Codehighlighter1_89_117_Closed_Image.style.display='inline'; Codehighlighter1_89_117_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_89_117_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_89_117_Closed_Text.style.display='none'; Codehighlighter1_89_117_Open_Image.style.display='inline'; Codehighlighter1_89_117_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">[]&nbsp;arr&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">[]&nbsp;</span><span id=Codehighlighter1_89_117_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_89_117_Open_Text><span style="COLOR: #000000">{&nbsp;</span><span style="COLOR: #000000">8</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">5</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">89</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">56</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">4</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">58</span><span style="COLOR: #000000">&nbsp;}</span></span><span style="COLOR: #000000">;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;m&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;from&nbsp;n&nbsp;</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;arr&nbsp;where&nbsp;n&nbsp;</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">&nbsp;5</span><span style="COLOR: #000000">&nbsp;orderby&nbsp;n&nbsp;select&nbsp;n;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">foreach</span><span style="COLOR: #000000">&nbsp;(var&nbsp;n&nbsp;</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;m)<br><img id=Codehighlighter1_221_265_Open_Image onclick="this.style.display='none'; Codehighlighter1_221_265_Open_Text.style.display='none'; Codehighlighter1_221_265_Closed_Image.style.display='inline'; Codehighlighter1_221_265_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_221_265_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_221_265_Closed_Text.style.display='none'; Codehighlighter1_221_265_Open_Image.style.display='inline'; Codehighlighter1_221_265_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_221_265_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_221_265_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine(n);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.ReadLine();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000">&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></span></div>
<br>
<p>这种的语法是不是和sql 语法非常像似呢。只是sql的写法一般select 在前而linq是在后的&nbsp;&nbsp;<br><br></p>
<img src ="http://www.cnblogs.com/lagger/aggbug/851877.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41937/" target="_blank">[新闻]Google拟在9月发布自有浏览器 或采用火狐内核</a>]]></description></item><item><title>修改个人博客主页css样式</title><link>http://www.cnblogs.com/lagger/archive/2007/08/10/850469.html</link><dc:creator>江闯</dc:creator><author>江闯</author><pubDate>Fri, 10 Aug 2007 03:19:00 GMT</pubDate><guid>http://www.cnblogs.com/lagger/archive/2007/08/10/850469.html</guid><wfw:comment>http://www.cnblogs.com/lagger/comments/850469.html</wfw:comment><comments>http://www.cnblogs.com/lagger/archive/2007/08/10/850469.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/lagger/comments/commentRss/850469.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lagger/services/trackbacks/850469.html</trackback:ping><description><![CDATA[<p style="FONT-SIZE: 12pt">昨天创建了个人博客。今天修改了一个主页模板。希望大家来指导.</p>
<img src ="http://www.cnblogs.com/lagger/aggbug/850469.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41936/" target="_blank">[新闻]微软正在构思将Wi-Fi带入汽车</a>]]></description></item><item><title>学习网站以来的错误总结</title><link>http://www.cnblogs.com/lagger/archive/2007/08/09/849317.html</link><dc:creator>江闯</dc:creator><author>江闯</author><pubDate>Thu, 09 Aug 2007 07:17:00 GMT</pubDate><guid>http://www.cnblogs.com/lagger/archive/2007/08/09/849317.html</guid><wfw:comment>http://www.cnblogs.com/lagger/comments/849317.html</wfw:comment><comments>http://www.cnblogs.com/lagger/archive/2007/08/09/849317.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnblogs.com/lagger/comments/commentRss/849317.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lagger/services/trackbacks/849317.html</trackback:ping><description><![CDATA[<p style="FONT-SIZE: 12pt">以下是我学网站以来的错误总结，写出来与大家分享一下。希望大家能有好的办法给予指导.<br>1&nbsp; 顶部图片下方有空隙产生解决的办法:<br>---------------------------------------------------------<br>1) 设置img 为 style="display:block"<br>2)设置vertical-align属性为vertical-align:top | bottom |middle |text-bottom </p>
<p style="FONT-SIZE: 12pt">2 弹出窗口时传参绑定问题,写时有时浏览器不能解析。正确写法<br>-----------------------------------------------------------<br>&nbsp; &lt;a href='#' onclick=javascript:window.showModelessDialog('listphoto.aspx?id=&lt;%#Getstr(Eval("picpath").ToString())%&gt;','','dialogWidth=800') &gt;</p>
<p style="FONT-SIZE: 12pt">3 css 中可能使有javascript 代码.<br>&nbsp;---------------------------------------------------------<br>如： Css 的expressin 可以用js 代码<br>&nbsp; a<br>&nbsp;{ <br>&nbsp;target:expression(this.target="_blank");<br>&nbsp;}</p>
<p style="FONT-SIZE: 12pt">4 在aspx 中，页名命名不能和函数名一样<br>---------------------------------------------------------<br>&nbsp;如，test.aspx,在test.aspx.cs，中，函数名不能命名为test()</p>
<p style="FONT-SIZE: 12pt">5 在.net2.0中，滚动条样式不能应用解决的办法<br>---------------------------------------------------------<br>1)删除应用样式前台代码中的此行代码<br>&nbsp; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;<br>2)滚动条样式的应式一般都写在body中。如：<br>&nbsp;body<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; SCROLLBAR-FACE-COLOR: #799ae1;&nbsp; <br>&nbsp;&nbsp;&nbsp; SCROLLBAR-HIGHLIGHT-COLOR: #799ae1; <br>&nbsp;&nbsp;&nbsp; SCROLLBAR-SHADOW-COLOR: #799ae1; <br>&nbsp;&nbsp;&nbsp; SCROLLBAR-3DLIGHT-COLOR: #799ae1; <br>&nbsp;&nbsp;&nbsp; SCROLLBAR-ARROW-COLOR: #ffffff;<br>&nbsp;&nbsp;&nbsp; SCROLLBAR-TRACK-COLOR: #aabfec; <br>&nbsp;&nbsp;&nbsp; SCROLLBAR-DARKSHADOW-COLOR: #799ae1;<br>&nbsp; }<br>把上面的body 改为html 就可应用上滚动条样式</p>
<p style="FONT-SIZE: 12pt">6 表格自动换行，不会被撑大<br>----------------------------------------------------------<br>&nbsp; style="table-layout: fixed; word-break: break-all; "</p>
<p style="FONT-SIZE: 12pt">7如何让某一标签应用两个 CSS样式<br>----------------------------------------------------------<br>&lt;p class="text side"&gt;...&lt;/p&gt;<br>同时给P元素两个类，中间用空格格开，这样所有text和side两个类的属性都会加到P元素上来。如果它们两个类中的属性有冲突的话，后设置的起作用，即在CSS文件中放在后面的类的属性起作用。</p>
<p style="FONT-SIZE: 12pt">8 应用样式时的优先级<br>----------------------------------------------------------<br>如: td{ height:19px!important;height:18px}<br>!important它指定当前样式的优先级为高，后边再进行定义的相同样式是不会将其重置。因此按标准的CSS来说，height:18px这一句是无效的，因为前边的定义具有更高的优先级。</p>
<p style="FONT-SIZE: 12pt">但是IE不支持该属性，而Firefox却支持。。</p>
<p style="FONT-SIZE: 12pt">因此在Firefox中认的是height:19px,而IE则会先被设置为height:19,然后再设置为height:18px，这种现象可以加以利用实现IE和Firefox的布局兼容</p>
<p style="FONT-SIZE: 12pt">9 使用.net 2.0换肤 用法总结<br>---------------------------------------------------------<br>换肤，在朋友的提醒下，用cookies。<br>便想到了用javascript 和cookies 一起来使用，但是javascript 不是太好用。后来就放弃了。<br>.net 2.0集成有skin 外观文件。可以用skin 和cookies 一起使用来实现这一效果.<br>方法:<br>1:)定义外观文件blue 和orage 两个，自动放在App_Themes 文件夹下.<br>2:)在blue和orange 文件夹下，可以建css文件和.skin文件.<br>3:)在page_PreInit()根据传参的不同，更改言主题;具体代码如下:<br>&nbsp;protected void Page_PreInit(object sender,System.EventArgs e)<br>&nbsp;{<br>&nbsp;&nbsp;string str="";<br>&nbsp;&nbsp;if(HttpContext.Current.Request.Cookies["theme"]!=null)<br>&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;str=Convert.ToString(HttpContext.Current.Request.Cookies["theme"])<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;if(!string.IsNullOrEmpty(Request.QueryString["theme"]))<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;Page.Theme=Request.QueryString["theme"];<br>&nbsp;&nbsp;&nbsp;HttpCookie skin=new HttpCookie("theme");<br>&nbsp;&nbsp;&nbsp;skin.Value=Page.Theme;<br>&nbsp;&nbsp;&nbsp;Response.Cookies.Add(skin);<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;else if(str.ToString()=="")<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;Page.Theme="blue";<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;else<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;Page.Theme=Request.Cookies["theme"].Value.ToString();<br>&nbsp;&nbsp;}<br>&nbsp;}</p>
<p style="FONT-SIZE: 12pt">代码这样写就实现了换肤的功能，但是你关闭该页面，再次打开时还是原来的，不是你更改过的，这是为什么呢？<br>找了好长时间才知道原来是cookies 没有设有效日期。<br>在建立cookies时加一句<br>skin.Expires=convert.ToDateTime(DateTime.Now+TimeSpan.FromDays(1));这样可以设cookies的有效时间为1天<br>通过这次学习学会了<br>1 使用cookies<br>2 skin <br>3 不旦 在Dream 下可以创建下拉菜单 ,在FireWorks 也可以实现。<br>10.javascript特殊字符<br>--------------------------------------------------------------------<br>&lt;body&gt;</p>
<p style="FONT-SIZE: 12pt">&lt;/body&gt;<br>&lt;script&gt;<br>data=function()<br>{/*测试数据放在这儿了随便放什么数据&#8220;'&#8221;或&#8220;"&#8221;这些特殊字符都可以*/}<br>alert((data+"").slice(13,-4))<br>&lt;/script&gt;<br>11.RSS实现方法。<br>-----------------------------------------------------------------<br>1:动态生成一个xml 文件 方法如下<br>1) 新建一下Rss.aspx 页，前台把html标签删除。<br>在Rss.aspx.cs页中Page_Load()中，<br>Response.ContentType="text/xml";<br>Response.Write(GetRss());<br>2)在GetRss()函数中生成一个Xml格式的文件<br>newsdb db = new newsdb();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string sqlstr = "select * from Content";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataSet ds = db.GetDatasetbysqlstr(sqlstr);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StringBuilder strCode = new StringBuilder();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append(@"&lt;rss verson='2.0'&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;channel&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;title&gt;新闻显示&lt;/title&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append(@"&lt;link&gt;http://"+Request.ServerVariables["SERVER_NAME"]+"&lt;/link&gt; ");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;copyright&gt;Copyright 2005&lt;/copyright&gt; ");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (DataRow dt in ds.Tables[0].Rows)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string ID = dt["NewsID"].ToString();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string title = dt["Title"].ToString();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;item&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;title&gt;" + title + "&lt;/title&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append(@"&lt;link&gt;http://" + Request.ServerVariables["SERVER_NAME"] + "/admin/Admin_show.aspx?ID=" + ID + "&lt;/link&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;/item&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="FONT-SIZE: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;/channel&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strCode.Append("&lt;/rss&gt;");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return strCode.ToString();<br>&nbsp;12. .net 2.0中url映射方法<br>----------------------------------------------------------------------<br>直接在webconfig中配<br>在 &lt;System.Web&gt;下<br>&lt;UrlMappings enabled="true"&gt;<br>&lt;add url="~/defalut" mappedUrl="default.aspx"&gt;<br>这样在引用页时直接用default就行了<br>如:&lt;a href="default"&gt;首页&lt;/a&gt;&nbsp;&nbsp; <br>此中方法可以隐藏扩展名 <br><br>13 .net 连结SQL2005，可以任意换到其它电脑而不用附加数据库<br>-------------------------------------------------------<br>在写连接字符串时在web.config中配置如下：<br>&lt;add name="Constr" connectionString="Data source=.;AttachDbFilename=|DataDirectory|\test.mdf";integrated secuity=true;"<br>providerName="System.Data.SqlClient"/&gt;<br>但是数据库要放在app_data下</p>
<p style="FONT-SIZE: 12pt">14.在数据绑定时如果是bool型的，用eval绑定时并不想让显示ture ,或false<br>---------------------------------------------------------------------</p>
<p style="FONT-SIZE: 12pt">&lt;ItemTemplate&gt;<br>&nbsp; &lt;asp:Label ID="flagLabel" runat="server"&nbsp; Text='&lt;%#Convert.ToInt32(Eval("flag"))==0 ? "&lt;span style=color:red&gt;未回答&lt;/span&gt;":"&lt;span class=finish&gt;&lt;/span&gt;" %&gt;'&gt;'&gt;&lt;/asp:Label&gt;<br>&nbsp; &lt;/ItemTemplate&gt; <br>&nbsp;15 使用showModelessDialog时，如果不想在对话框中弹出新窗口，解决办法<br>----------------------------------------------------------------------<br>&lt;a href="#" onclick=javascript:window.showModelessDialog('answerquestion.aspx?id=&lt;%#Eval("id")%&gt;','','dialogWidth=800') &gt;回答&lt;/a&gt;<br>在answerquestion.aspx页中的&lt;head&gt;与&lt;/head&gt;之间加上这行代码<br>&lt;base target="_self"&gt;&nbsp; <br></p>
<img src ="http://www.cnblogs.com/lagger/aggbug/849317.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41935/" target="_blank">[新闻]对比测试：IE8 Beta 2 VS Firefox 3.0.1</a>]]></description></item><item><title>sharepoint 中修改域账号密码</title><link>http://www.cnblogs.com/lagger/archive/2007/08/09/849303.html</link><dc:creator>江闯</dc:creator><author>江闯</author><pubDate>Thu, 09 Aug 2007 07:06:00 GMT</pubDate><guid>http://www.cnblogs.com/lagger/archive/2007/08/09/849303.html</guid><wfw:comment>http://www.cnblogs.com/lagger/comments/849303.html</wfw:comment><comments>http://www.cnblogs.com/lagger/archive/2007/08/09/849303.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/lagger/comments/commentRss/849303.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lagger/services/trackbacks/849303.html</trackback:ping><description><![CDATA[<span style="FONT-SIZE: 12pt">&nbsp;&nbsp;&nbsp; 前台代码如下:<br>
<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">div&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="center"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">table&nbsp;</span><span style="COLOR: #ff0000">cellpadding</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #ff0000">&nbsp;cellspacing</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #ff0000">&nbsp;border</span><span style="COLOR: #0000ff">="0"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="right"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px&nbsp;;&nbsp;padding-top:15px;&nbsp;color:#1987df;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名:<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;&nbsp;color:#1987df;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:TextBox&nbsp;</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="txtusername"</span><span style="COLOR: #ff0000">&nbsp;BackColor</span><span style="COLOR: #0000ff">=Snow&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #ff0000">runat</span><span style="COLOR: #0000ff">="Server"</span><span style="COLOR: #ff0000">&nbsp;ReadOnly</span><span style="COLOR: #0000ff">="true"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;&nbsp;BorderStyle</span><span style="COLOR: #0000ff">="solid"</span><span style="COLOR: #ff0000">&nbsp;BorderWidth</span><span style="COLOR: #0000ff">="1px"</span><span style="COLOR: #ff0000">&nbsp;BorderColor</span><span style="COLOR: #0000ff">="#1987df"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:TextBox</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="right"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;&nbsp;color:#1987df;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">旧密码:</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="left"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">asp:TextBox&nbsp;</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="oldpwd"</span><span style="COLOR: #ff0000">&nbsp;runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;&nbsp;BorderStyle</span><span style="COLOR: #0000ff">="solid"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;&nbsp;TextMode</span><span style="COLOR: #0000ff">="password"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;BorderWidth</span><span style="COLOR: #0000ff">="1px"</span><span style="COLOR: #ff0000">&nbsp;BorderColor</span><span style="COLOR: #0000ff">="#1987df"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:TextBox</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="right"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;&nbsp;color:#1987df;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">新密码:</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="left"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">asp:TextBox&nbsp;</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="newpwd"</span><span style="COLOR: #ff0000">&nbsp;runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;TextMode</span><span style="COLOR: #0000ff">="password"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;BorderStyle</span><span style="COLOR: #0000ff">="solid"</span><span style="COLOR: #ff0000">&nbsp;BorderWidth</span><span style="COLOR: #0000ff">="1px"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;&nbsp;&nbsp;BorderColor</span><span style="COLOR: #0000ff">="#1987df"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:TextBox</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="right"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;&nbsp;color:#1987df;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">新密码:</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">align</span><span style="COLOR: #0000ff">="left"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;"</span><span style="COLOR: #0000ff">&gt;&lt;</span><span style="COLOR: #800000">asp:TextBox&nbsp;</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="surepwd"</span><span style="COLOR: #ff0000">&nbsp;runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;TextMode</span><span style="COLOR: #0000ff">="password"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;BorderStyle</span><span style="COLOR: #0000ff">="solid"</span><span style="COLOR: #ff0000">&nbsp;BorderWidth</span><span style="COLOR: #0000ff">="1px"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;&nbsp;BorderColor</span><span style="COLOR: #0000ff">="#1987df"</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">asp:TextBox</span><span style="COLOR: #0000ff">&gt;&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">tr&nbsp;</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">td&nbsp;</span><span style="COLOR: #ff0000">colspan</span><span style="COLOR: #0000ff">="2"</span><span style="COLOR: #ff0000">&nbsp;align</span><span style="COLOR: #0000ff">="center"</span><span style="COLOR: #ff0000">&nbsp;style</span><span style="COLOR: #0000ff">="height:&nbsp;22px;&nbsp;padding-top:15px;"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">asp:Button&nbsp;</span><span style="COLOR: #ff0000">ID</span><span style="COLOR: #0000ff">="btnSubmit"</span><span style="COLOR: #ff0000">&nbsp;runat</span><span style="COLOR: #0000ff">="server"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;Text</span><span style="COLOR: #0000ff">="修改"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;BorderStyle</span><span style="COLOR: #0000ff">="solid"</span><span style="COLOR: #ff0000">&nbsp;BorderWidth</span><span style="COLOR: #0000ff">="1px"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;OnClientClick</span><span style="COLOR: #0000ff">="if(!confirm('确认修改?')){return&nbsp;false}"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;BorderColor</span><span style="COLOR: #0000ff">="#1987df"</span><span style="COLOR: #ff0000">&nbsp;&nbsp;Width</span><span style="COLOR: #0000ff">="65"</span><span style="COLOR: #ff0000">&nbsp;BackColor</span><span style="COLOR: #0000ff">="lightblue"</span><span style="COLOR: #ff0000">&nbsp;OnClick</span><span style="COLOR: #0000ff">="btnSubmit_Click"</span><span style="COLOR: #ff0000">&nbsp;</span><span style="COLOR: #0000ff">/&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">td</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">tr</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">table</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">div</span><span style="COLOR: #0000ff">&gt;</span></div>
<br><br>后台代码如下:<br>
<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;&nbsp;DirectoryEntry&nbsp;GetDirectoryEntry()<br><img id=Codehighlighter1_49_214_Open_Image onclick="this.style.display='none'; Codehighlighter1_49_214_Open_Text.style.display='none'; Codehighlighter1_49_214_Closed_Image.style.display='inline'; Codehighlighter1_49_214_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_49_214_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_49_214_Closed_Text.style.display='none'; Codehighlighter1_49_214_Open_Image.style.display='inline'; Codehighlighter1_49_214_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_49_214_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_49_214_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DirectoryEntry&nbsp;entry&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;DirectoryEntry(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">WinNT://hist-sharepoint</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">"用户名</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">密码</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>AuthenticationTypes.Secure);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;entry;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;GetName(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;username)<br><img id=Codehighlighter1_263_432_Open_Image onclick="this.style.display='none'; Codehighlighter1_263_432_Open_Text.style.display='none'; Codehighlighter1_263_432_Closed_Image.style.display='inline'; Codehighlighter1_263_432_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_263_432_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_263_432_Closed_Text.style.display='none'; Codehighlighter1_263_432_Open_Image.style.display='inline'; Codehighlighter1_263_432_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_263_432_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_263_432_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DirectoryEntry&nbsp;user;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;user&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;GetDirectoryEntry().Children.Find(username,&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">User</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;user.Properties[</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">FullName</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">].Value.ToString();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">&nbsp;Page_Load(</span><span style="COLOR: #0000ff">object</span><span style="COLOR: #000000">&nbsp;sender,&nbsp;EventArgs&nbsp;e)<br><img id=Codehighlighter1_495_694_Open_Image onclick="this.style.display='none'; Codehighlighter1_495_694_Open_Text.style.display='none'; Codehighlighter1_495_694_Closed_Image.style.display='inline'; Codehighlighter1_495_694_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_495_694_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_495_694_Closed_Text.style.display='none'; Codehighlighter1_495_694_Open_Image.style.display='inline'; Codehighlighter1_495_694_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_495_694_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_495_694_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;username&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.Context.User.Identity.Name.ToString();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;username.Substring(username.LastIndexOf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\\</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.txtusername.Text&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;username;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">&nbsp;btnSubmit_Click(</span><span style="COLOR: #0000ff">object</span><span style="COLOR: #000000">&nbsp;sender,&nbsp;EventArgs&nbsp;e)<br><img id=Codehighlighter1_764_1980_Open_Image onclick="this.style.display='none'; Codehighlighter1_764_1980_Open_Text.style.display='none'; Codehighlighter1_764_1980_Closed_Image.style.display='inline'; Codehighlighter1_764_1980_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_764_1980_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_764_1980_Closed_Text.style.display='none'; Codehighlighter1_764_1980_Open_Image.style.display='inline'; Codehighlighter1_764_1980_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_764_1980_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_764_1980_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;oldpsd&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.oldpwd.Text.ToString().Trim();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;newpsd&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.newpwd.Text.ToString().Trim();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;Spwd&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.surepwd.Text.ToString().Trim();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">&nbsp;(oldpsd.Trim()</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_993_1110_Open_Image onclick="this.style.display='none'; Codehighlighter1_993_1110_Open_Text.style.display='none'; Codehighlighter1_993_1110_Closed_Image.style.display='inline'; Codehighlighter1_993_1110_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_993_1110_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_993_1110_Closed_Text.style.display='none'; Codehighlighter1_993_1110_Open_Image.style.display='inline'; Codehighlighter1_993_1110_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_993_1110_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_993_1110_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page.ClientScript.RegisterStartupScript(&nbsp;GetType(),</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">,&nbsp;Getjs(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">用户旧密码不能为空</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">&nbsp;(newpsd.Trim()&nbsp;</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_1153_1284_Open_Image onclick="this.style.display='none'; Codehighlighter1_1153_1284_Open_Text.style.display='none'; Codehighlighter1_1153_1284_Closed_Image.style.display='inline'; Codehighlighter1_1153_1284_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1153_1284_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1153_1284_Closed_Text.style.display='none'; Codehighlighter1_1153_1284_Open_Image.style.display='inline'; Codehighlighter1_1153_1284_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_1153_1284_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_1153_1284_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page.ClientScript.RegisterStartupScript(GetType(),&nbsp;</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">,&nbsp;Getjs(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">用户新密码不能为空</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">&nbsp;(newpsd&nbsp;</span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000">&nbsp;Spwd)<br><img id=Codehighlighter1_1322_1420_Open_Image onclick="this.style.display='none'; Codehighlighter1_1322_1420_Open_Text.style.display='none'; Codehighlighter1_1322_1420_Closed_Image.style.display='inline'; Codehighlighter1_1322_1420_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1322_1420_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1322_1420_Closed_Text.style.display='none'; Codehighlighter1_1322_1420_Open_Image.style.display='inline'; Codehighlighter1_1322_1420_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_1322_1420_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_1322_1420_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page.ClientScript.RegisterStartupScript(GetType(),&nbsp;</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">,&nbsp;Getjs(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">两次输入密码不一致</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">));<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">try</span><span style="COLOR: #000000"><br><img id=Codehighlighter1_1442_1834_Open_Image onclick="this.style.display='none'; Codehighlighter1_1442_1834_Open_Text.style.display='none'; Codehighlighter1_1442_1834_Closed_Image.style.display='inline'; Codehighlighter1_1442_1834_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1442_1834_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1442_1834_Closed_Text.style.display='none'; Codehighlighter1_1442_1834_Open_Image.style.display='inline'; Codehighlighter1_1442_1834_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_1442_1834_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_1442_1834_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;username&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">.Context.User.Identity.Name.ToString();<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;username&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;username.Substring(username.LastIndexOf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\\</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DirectoryEntry&nbsp;user&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;DirectoryEntry(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">WinNT://./</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">&nbsp;username);&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img id=Codehighlighter1_1782_1798_Open_Image onclick="this.style.display='none'; Codehighlighter1_1782_1798_Open_Text.style.display='none'; Codehighlighter1_1782_1798_Closed_Image.style.display='inline'; Codehighlighter1_1782_1798_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1782_1798_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1782_1798_Closed_Text.style.display='none'; Codehighlighter1_1782_1798_Open_Image.style.display='inline'; Codehighlighter1_1782_1798_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;user.Invoke(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">ChangePassword</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">object</span><span style="COLOR: #000000">[]&nbsp;</span><span id=Codehighlighter1_1782_1798_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_1782_1798_Open_Text><span style="COLOR: #000000">{oldpsd,&nbsp;newpsd&nbsp;}</span></span><span style="COLOR: #000000">);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">catch</span><span style="COLOR: #000000">&nbsp;(Exception&nbsp;ex)<br><img id=Codehighlighter1_1873_1973_Open_Image onclick="this.style.display='none'; Codehighlighter1_1873_1973_Open_Text.style.display='none'; Codehighlighter1_1873_1973_Closed_Image.style.display='inline'; Codehighlighter1_1873_1973_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_1873_1973_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1873_1973_Closed_Text.style.display='none'; Codehighlighter1_1873_1973_Open_Image.style.display='inline'; Codehighlighter1_1873_1973_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_1873_1973_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_1873_1973_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page.ClientScript.RegisterStartupScript(GetType(),&nbsp;</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">,&nbsp;Getjs(ex.ToString()));<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="COLOR: #000000"><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;Getjs(</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;str)<br><img id=Codehighlighter1_2024_2231_Open_Image onclick="this.style.display='none'; Codehighlighter1_2024_2231_Open_Text.style.display='none'; Codehighlighter1_2024_2231_Closed_Image.style.display='inline'; Codehighlighter1_2024_2231_Closed_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_2024_2231_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2024_2231_Closed_Text.style.display='none'; Codehighlighter1_2024_2231_Open_Image.style.display='inline'; Codehighlighter1_2024_2231_Open_Text.style.display='inline';" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</span><span id=Codehighlighter1_2024_2231_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cnblogs.com/Images/dot.gif"></span><span id=Codehighlighter1_2024_2231_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;str.Replace(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\\\</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;str.Replace(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\r\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;js&nbsp;</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">&lt;script&nbsp;language='javascript'&gt;alert(\</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">&nbsp;+&nbsp;str&nbsp;+&nbsp;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);&lt;/script&gt;</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">&nbsp;js;<br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><br><img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
<br></span>
<img src ="http://www.cnblogs.com/lagger/aggbug/849303.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41935/" target="_blank">[新闻]对比测试：IE8 Beta 2 VS Firefox 3.0.1</a>]]></description></item><item><title>sharepoint 中用usercontrol添加域账号的实现</title><link>http://www.cnblogs.com/lagger/archive/2007/08/09/849043.html</link><dc:creator>江闯</dc:creator><author>江闯</author><pubDate>Thu, 09 Aug 2007 04:09:00 GMT</pubDate><guid>http://www.cnblogs.com/lagger/archive/2007/08/09/849043.html</guid><wfw:comment>http://www.cnblogs.com/lagger/comments/849043.html</wfw:comment><comments>http://www.cnblogs.com/lagger/archive/2007/08/09/849043.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnblogs.com/lagger/comments/commentRss/849043.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/lagger/services/trackbacks/849043.html</trackback:ping><description><![CDATA[摘要: 初学sharepoint 做了一个添加新账号 QuickPart是一个方便开发人员快速开发Web Part的工具。它能够将一个普通的ASP.NET用户控件包装成一个标准的Web Part，用于SharePoint中。也就是说，开发人员只需要创建出标准的ASP.NET用户控件，然后就可以使用QuickPart来将这个用户控件当做Web Part来使用。 机器上安装上QuickPart 以后，就可以自&nbsp;&nbsp;<a href='http://www.cnblogs.com/lagger/archive/2007/08/09/849043.html'>阅读全文</a><img src ="http://www.cnblogs.com/lagger/aggbug/849043.html?type=1" width = "1" height = "1" /><br><br><a href="http://news.cnblogs.com/n/41935/" target="_blank">[新闻]对比测试：IE8 Beta 2 VS Firefox 3.0.1</a>]]></description></item></channel></rss>