<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Microsoft Technology, .Net, BizTalk, Sharepoint &#38; etc. &#187; RegisterStartupScript</title>
	<atom:link href="http://littletalk.wordpress.com/tag/registerstartupscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://littletalk.wordpress.com</link>
	<description>Liedong(Ken) Zheng, Senior SharePoint Developer at SIMPLOT</description>
	<lastBuildDate>Tue, 22 Dec 2009 23:44:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='littletalk.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/273a2ea2429a815e9b5d08a05fc38987?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Microsoft Technology, .Net, BizTalk, Sharepoint &#38; etc. &#187; RegisterStartupScript</title>
		<link>http://littletalk.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://littletalk.wordpress.com/osd.xml" title="Microsoft Technology, .Net, BizTalk, Sharepoint &amp; etc." />
		<item>
		<title>CustomValidator and RegisterStartupScript</title>
		<link>http://littletalk.wordpress.com/2008/05/02/customvalidator-and-registerstartupscript/</link>
		<comments>http://littletalk.wordpress.com/2008/05/02/customvalidator-and-registerstartupscript/#comments</comments>
		<pubDate>Fri, 02 May 2008 10:39:14 +0000</pubDate>
		<dc:creator>ken zheng</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[RegisterStartupScript]]></category>

		<guid isPermaLink="false">http://littletalk.wordpress.com/?p=70</guid>
		<description><![CDATA[Today, I was working on customvalidate a custom control in wizard. I spent whole morning trying to get customvalidator working. But unfortunately, the custom control can&#8217;t be found by document.getElementById.
Anyway, I just put some code so next time you can have an example to create a custom validator.
in Web page:
&#60;asp:CustomValidator ID=&#8221;rfvBillable&#8221; ClientValidationFunction=&#8221;ValidateTextbox&#8221; runat=&#8221;server&#8221; ErrorMessage=&#8221;Billable is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=littletalk.wordpress.com&blog=2688155&post=70&subd=littletalk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today, I was working on customvalidate a custom control in wizard. I spent whole morning trying to get customvalidator working. But unfortunately, the custom control can&#8217;t be found by document.getElementById.</p>
<p>Anyway, I just put some code so next time you can have an example to create a custom validator.</p>
<p>in Web page:</p>
<p>&lt;asp:CustomValidator ID=&#8221;rfvBillable&#8221; ClientValidationFunction=&#8221;ValidateTextbox&#8221; runat=&#8221;server&#8221; ErrorMessage=&#8221;Billable is required.&#8221;&gt;*&lt;/asp:CustomValidator&gt;</p>
<p>in code:</p>
<p>        private void RegisterScipts()<br />
        {<br />
            if (!Page.ClientScript.IsStartupScriptRegistered(&#8220;Startup&#8221;))<br />
            {<br />
                // Form the script to be registered at client side.<br />
                String scriptString = &#8220;&lt;script language=\&#8221;JavaScript\&#8221;&gt; function ValidateTextbox(source, args) {&#8220;;<br />
                scriptString += &#8220;var value=document.getElementById(&#8216;&#8221; + AdhocTimesheetDate.ClientID + &#8220;&#8216;).value;&#8221;;<br />
                scriptString += &#8220;if(value.length &gt;0 ){args.IsValid=true;}&#8221;;<br />
                scriptString += &#8220;else{args.IsValid=false;}&#8221;;<br />
                scriptString += &#8220;}&lt;&#8221;;<br />
                scriptString += &#8220;/&#8221;;<br />
                scriptString += &#8220;script&gt;&#8221;;<br />
                Page.ClientScript.RegisterStartupScript(typeof(Page), &#8220;Startup&#8221;, scriptString);<br />
            }</p>
<p>        }</p>
<p>You need to Page.ClientScript.RegisterStartupScript in .Net 3.5</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/littletalk.wordpress.com/70/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/littletalk.wordpress.com/70/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/littletalk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/littletalk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/littletalk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/littletalk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/littletalk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/littletalk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/littletalk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/littletalk.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/littletalk.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/littletalk.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=littletalk.wordpress.com&blog=2688155&post=70&subd=littletalk&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://littletalk.wordpress.com/2008/05/02/customvalidator-and-registerstartupscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e36e65741ca6b868a4f626cb656121bb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ken zheng</media:title>
		</media:content>
	</item>
	</channel>
</rss>