﻿<?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>博客园-Clingingboy-最新评论</title><link>http://www.cnblogs.com/Clingingboy/CommentsRSS.aspx</link><description>&amp;lt;clingingboy:control runat=&amp;quot;server&amp;quot;&amp;nbsp; /&amp;gt;&lt;br /&gt;
Get Ready For WPF &amp;&amp; SilverLight
</description><language>zh-cn</language><pubDate>Wed, 09 Jul 2008 01:29:14 GMT</pubDate><lastBuildDate>Wed, 09 Jul 2008 01:29:14 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: asp.net控件开发基础(1)</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/06/463471.html#1246242</link><dc:creator>思惟</dc:creator><author>思惟</author><pubDate>Sun, 06 Jul 2008 07:00:41 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/06/463471.html#1246242</guid><description><![CDATA[using System;<br>using System.Collections.Generic;<br>using System.Text;<br>using System.Web.UI.WebControls;<br>using System.Web.UI;<br>using System.Collections;<br><br>namespace LianX<br>{<br>    public class JavaScript : CompositeControl<br>    {<br>        private TextBox _textboxPwd;//密码<br>        private TextBox _textboxName;//登录名<br>        private TextBox _textboxpassword;//密码确认<br>        private TextBox _textboxEmail;//邮箱<br>        private DropDownList _ddlSecurity;//安全问题<br>        private TextBox _textboxSolution;//问题答案<br>        private Button _button;//提交<br><br>        private RequiredFieldValidator _rfvName;//验证登录名是否为空<br>        private RequiredFieldValidator _rfvPwd;//验证密码是否为空<br>        private CompareValidator _cvPassword;//验证密码的一致<br>        private RegularExpressionValidator _revEmail;//验证邮箱的正确<br>        private RequiredFieldValidator _rfvEmail;//验证邮箱是否为空<br>        private RequiredFieldValidator _rfvSolution;//问题答案验证<br><br>        public DropDownList DdlSecurity<br>        {<br>            get<br>            {<br>                EnsureChildControls();<br>                return _ddlSecurity;<br>            }<br>            set<br>            {<br>                EnsureChildControls();<br>                _ddlSecurity.DataSource = value;<br>            }<br>        }<br>        public string txtname<br>        {<br>            get<br>            {<br>                EnsureChildControls();<br>                return _textboxPwd.Text;<br>            }<br>            set<br>            {<br>                EnsureChildControls();<br>                _textboxPwd.Text = value;<br>            }<br>        }<br>        protected override void CreateChildControls()<br>        {<br><br>            //登录名<br>            _textboxName = new TextBox();<br>            _textboxName.ID = &quot;textName&quot;;<br>            this.Controls.Add(_textboxName);<br>            //密码<br>            _textboxPwd = new TextBox();<br>            _textboxPwd.ID = &quot;textPwd&quot;;<br>            this.Controls.Add(_textboxPwd);<br>            //确认密码<br>            _textboxpassword = new TextBox();<br>            _textboxpassword.ID = &quot;password&quot;;<br>            this.Controls.Add(_textboxpassword);<br>            //邮箱<br>            _textboxEmail = new TextBox();<br>            _textboxEmail.ID = &quot;email&quot;;<br>            this.Controls.Add(_textboxEmail);<br>            //安全问题<br>            _ddlSecurity = new DropDownList();<br>            _ddlSecurity.ID = &quot;security&quot;;<br>            this.Controls.Add(_ddlSecurity);<br>            //问题答案<br>            _textboxSolution = new TextBox();<br>            _textboxSolution.ID = &quot;solution&quot;;<br>            this.Controls.Add(_textboxSolution);<br>            //问题验证<br>            _rfvSolution = new RequiredFieldValidator();<br>            _rfvSolution.ID = &quot;rfvsolution&quot;;<br>            _rfvSolution.ControlToValidate = &quot;solution&quot;;<br>            _rfvSolution.ErrorMessage = &quot;*&quot;;<br>            this.Controls.Add(_rfvSolution);<br>            //登录名验证<br>            _rfvName = new RequiredFieldValidator();<br>            _rfvName.ID = &quot;rfvname&quot;;<br>            _rfvName.ControlToValidate = &quot;textName&quot;;<br>            _rfvName.ErrorMessage = &quot;*&quot;;<br>            this.Controls.Add(_rfvName);<br><br>            //密码验证<br>            _rfvPwd = new RequiredFieldValidator();<br>            _rfvPwd.ID = &quot;rfvpwd&quot;;<br>            _rfvPwd.ControlToValidate = &quot;textPwd&quot;;<br>            _rfvPwd.ErrorMessage = &quot;*&quot;;<br>            this.Controls.Add(_rfvPwd);<br>            //密码一致<br>            _cvPassword = new CompareValidator();<br>            _cvPassword.ID = &quot;cvpassword&quot;;<br>            _cvPassword.ControlToCompare = &quot;textPwd&quot;;<br>            _cvPassword.ControlToValidate = &quot;password&quot;;<br>            _cvPassword.ErrorMessage = &quot;*&quot;;<br>            this.Controls.Add(_cvPassword);<br>            //邮箱正确验证<br>            _revEmail = new RegularExpressionValidator();<br>            _revEmail.ID = &quot;revemail&quot;;<br>            _revEmail.ControlToValidate = &quot;email&quot;;<br>            _revEmail.ErrorMessage = &quot;*&quot;;<br>            _revEmail.ValidationExpression = &quot;'\'w+([-+.']'\'w+)*@'\'w+([-.]'\'w+)*'\'.'\'w+([-.]'\'w+)*&quot;;<br>            this.Controls.Add(_revEmail);<br>            //邮箱非空性验证<br>            _rfvEmail = new RequiredFieldValidator();<br>            _rfvEmail.ID = &quot;rfvemail&quot;;<br>            _rfvEmail.ControlToValidate = &quot;email&quot;;<br>            _rfvEmail.ErrorMessage = &quot;*&quot;;<br>            this.Controls.Add(_rfvEmail);<br>            //提交<br>            _button = new Button();<br>            _button.ID = &quot;submit&quot;;<br>            _button.Text = &quot;注册&quot;;<br>            this.Controls.Add(_button);<br>        }<br>        protected override void OnPreRender(EventArgs e)<br>        {<br>            ///注册验证密码强度的JavaScript脚步<br>            if (!Page.ClientScript.IsClientScriptBlockRegistered(&quot;checkPwd&quot;))<br>            {<br>                Page.ClientScript.RegisterClientScriptInclude(&quot;checkPwd&quot;, Page.ResolveUrl(&quot;~/script/javascripts.js&quot;));<br>            }<br>            ///注册验证密码强度的JavaScript脚步<br>            if (!Page.ClientScript.IsClientScriptBlockRegistered(&quot;checkName&quot;))<br>            {<br>                Page.ClientScript.RegisterClientScriptInclude(&quot;checkName&quot;, Page.ResolveUrl(&quot;~/script/javascripts.js&quot;));<br>            }<br>            base.OnPreRender(e);<br>        }<br>        protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)<br>        {<br>            //注册DIV<br>            writer.RenderBeginTag(HtmlTextWriterTag.Table);<br>            #region 登录名验证<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.Write(&quot;登录名：&quot;);<br>            writer.RenderEndTag();<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.AddAttribute(HtmlTextWriterAttribute.Onchange, &quot;checkName(this)&quot;);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _textboxName.ClientID);<br>            _textboxName.RenderBeginTag(writer);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _rfvName.ClientID);<br>            _rfvName.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            #endregion<br>            #region 密码验证<br>            // 注册P<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            //注册td<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.Write(&quot;密码：&quot;);<br>            writer.RenderEndTag();//结束td<br>            //注册td<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            //注册TEXTBOX<br>            writer.AddAttribute(HtmlTextWriterAttribute.Onchange, &quot;checkPwd(this)&quot;);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _textboxPwd.ClientID);<br>            _textboxPwd.RenderBeginTag(writer);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _rfvPwd.ClientID);<br>            _rfvPwd.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();//结束TEXTBox<br>            writer.RenderEndTag();//结束td<br>            writer.RenderEndTag();//结束P<br>            //注册P<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            //注册td <br>            writer.AddAttribute(HtmlTextWriterAttribute.Colspan, &quot;2&quot;);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            //注册htmlImg<br>            writer.AddStyleAttribute(&quot;background-color&quot;, &quot;#9900ff&quot;);<br>            writer.AddStyleAttribute(&quot;display&quot;, &quot;none&quot;);<br>            writer.AddStyleAttribute(&quot;width&quot;, &quot;0px&quot;);<br>            writer.AddStyleAttribute(&quot;height&quot;, &quot;10px&quot;);<br>            writer.AddAttribute(HtmlTextWriterAttribute.Id, &quot;show&quot;);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Img);<br>            writer.RenderEndTag();//结束img<br>            writer.AddAttribute(HtmlTextWriterAttribute.Id, &quot;span&quot;);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Span);<br>            writer.RenderEndTag();//结束span<br>            writer.RenderEndTag();//结束tr<br>            #endregion<br>            #region 密码一致<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.Write(&quot;核实密码：&quot;);<br>            writer.RenderEndTag();<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _textboxpassword.ClientID);<br>            _textboxpassword.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            #endregion<br>            #region 邮箱<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.Write(&quot;邮箱：&quot;);<br>            writer.RenderEndTag();<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _textboxEmail.ClientID);<br>            _textboxEmail.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            #endregion<br>            #region 安全问题<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.Write(&quot;安全问题：&quot;);<br>            writer.RenderEndTag();<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For, _ddlSecurity.ClientID);<br>            _ddlSecurity.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            #endregion<br>            #region 问题答案<br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.Write(&quot;问题答案：&quot;);<br>            writer.RenderEndTag();<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For,_textboxSolution.ClientID);<br>            _textboxSolution.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            #endregion <br>            writer.RenderBeginTag(HtmlTextWriterTag.Tr);<br>            writer.RenderBeginTag(HtmlTextWriterTag.Td);<br>            writer.AddAttribute(HtmlTextWriterAttribute.Colspan,&quot;2&quot;);<br>            writer.AddStyleAttribute(&quot;text-algin&quot;,&quot;conent&quot;);<br>            writer.AddAttribute(HtmlTextWriterAttribute.For,_button.ClientID);<br>            _button.RenderBeginTag(writer);<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br>            writer.RenderEndTag();<br><br>            writer.RenderEndTag();//结束Div<br>            //base.RenderContents(writer);<br>        }<br>    }<br>}<br><br><br>请帮我看一下，为什么验证控件不能验证文本框<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">思惟</a> 2008-07-06 15:00 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/06/463471.html#1246242#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf控件开发基础(1)</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/04/1235081.html#1244785</link><dc:creator>caspnet</dc:creator><author>caspnet</author><pubDate>Fri, 04 Jul 2008 05:32:14 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/04/1235081.html#1244785</guid><description><![CDATA[支持:)<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">caspnet</a> 2008-07-04 13:32 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/04/1235081.html#1244785#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf控件开发基础(1)</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/04/1235081.html#1244381</link><dc:creator>WCF群组博客</dc:creator><author>WCF群组博客</author><pubDate>Fri, 04 Jul 2008 00:39:11 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/04/1235081.html#1244381</guid><description><![CDATA[顶一个！<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">WCF群组博客</a> 2008-07-04 08:39 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/04/1235081.html#1244381#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf控件开发基础(1)</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1235081.html#1244233</link><dc:creator>王孟军！</dc:creator><author>王孟军！</author><pubDate>Thu, 03 Jul 2008 15:06:16 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1235081.html#1244233</guid><description><![CDATA[我狂支持<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">王孟军！</a> 2008-07-03 23:06 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1235081.html#1244233#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf/silverlight文章推荐</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1233650.html#1243822</link><dc:creator>Clingingboy</dc:creator><author>Clingingboy</author><pubDate>Thu, 03 Jul 2008 07:57:16 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1233650.html#1243822</guid><description><![CDATA[@包建强<br>为了包包那每周一次的点击量,我得好好干<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">Clingingboy</a> 2008-07-03 15:57 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1233650.html#1243822#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf/silverlight文章推荐</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1233650.html#1243294</link><dc:creator>包建强</dc:creator><author>包建强</author><pubDate>Thu, 03 Jul 2008 01:47:07 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1233650.html#1243294</guid><description><![CDATA[◎博爱<br>坚持下去，每周推荐一次，我会每期都看的。hoho<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">包建强</a> 2008-07-03 09:47 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/03/1233650.html#1243294#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf/silverlight文章推荐</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241892</link><dc:creator>David</dc:creator><author>David</author><pubDate>Wed, 02 Jul 2008 01:34:13 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241892</guid><description><![CDATA[就看了一点，平时都没啥时间看这个。抽空瞅瞅。<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">David</a> 2008-07-02 09:34 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241892#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: asp.net控件开发基础系列</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/506741.html#1241854</link><dc:creator>火无极</dc:creator><author>火无极</author><pubDate>Wed, 02 Jul 2008 01:13:10 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/506741.html#1241854</guid><description><![CDATA[控件开发系列，写得这么详细，学习了！<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">火无极</a> 2008-07-02 09:13 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/02/506741.html#1241854#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: wpf/silverlight文章推荐</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241805</link><dc:creator>AlexChen</dc:creator><author>AlexChen</author><pubDate>Wed, 02 Jul 2008 00:39:53 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241805</guid><description><![CDATA[@超声波明渠流量计<br>使用Visual Stdio 2005(安装.Net 3.0) 或者Visual Stdio 2008<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">AlexChen</a> 2008-07-02 08:39 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241805#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re:wpf/silverlight文章推荐</title><link>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241729</link><dc:creator>超声波明渠流量计</dc:creator><author>超声波明渠流量计</author><pubDate>Tue, 01 Jul 2008 18:44:16 GMT</pubDate><guid>http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241729</guid><description><![CDATA[学习wpf用什么工具。*<br><br><div align=right><a style="text-decoration:none;" href="http://Clingingboy.cnblogs.com/" target="_blank">超声波明渠流量计</a> 2008-07-02 02:44 <a href="http://www.cnblogs.com/Clingingboy/archive/2008/07/02/1233650.html#1241729#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>