<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to Point CompareValidator&#8217;s ControlToCompare Attribute at a HiddenField</title>
	<atom:link href="http://shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/feed/" rel="self" type="application/rss+xml" />
	<link>http://shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/</link>
	<description>Shane Shepherd: web design and development; music</description>
	<lastBuildDate>Mon, 25 Oct 2010 17:39:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Shane</title>
		<link>http://shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/comment-page-1/#comment-26187</link>
		<dc:creator>Shane</dc:creator>
		<pubDate>Mon, 25 Oct 2010 17:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/#comment-26187</guid>
		<description>@Paul - This article was written back in 2007, the MVC framework has changed quite a bit since then.  Sorry you didn&#039;t find what you needed.</description>
		<content:encoded><![CDATA[<p>@Paul &#8211; This article was written back in 2007, the MVC framework has changed quite a bit since then.  Sorry you didn&#8217;t find what you needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Kool</title>
		<link>http://shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/comment-page-1/#comment-26186</link>
		<dc:creator>Paul Kool</dc:creator>
		<pubDate>Mon, 25 Oct 2010 02:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/#comment-26186</guid>
		<description>This did not work for me.  The field name (in the example it would be &quot;hiddenBalance&quot; could not be found.

No difference for me, really.</description>
		<content:encoded><![CDATA[<p>This did not work for me.  The field name (in the example it would be &#8220;hiddenBalance&#8221; could not be found.</p>
<p>No difference for me, really.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Reynolds (IT Contractor)</title>
		<link>http://shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/comment-page-1/#comment-22215</link>
		<dc:creator>Jon Reynolds (IT Contractor)</dc:creator>
		<pubDate>Tue, 23 Sep 2008 11:10:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/#comment-22215</guid>
		<description>I resolved this by keeping the hidden field as before but adding a custom validator to compare the hidden field value.


*

and in javascript added the following func:


function comparefunc(sender, args) 
{
        var hid = document.getElementById(&quot;&quot;);
        var text = document.getElementById(&quot;&quot;);
               
  if (hid.value == text.value) 
  {
      //values have not changed
      args.IsValid = true;
      return;
  }
  
  args.IsValid = false;
  return;
}

Make sense??</description>
		<content:encoded><![CDATA[<p>I resolved this by keeping the hidden field as before but adding a custom validator to compare the hidden field value.</p>
<p>*</p>
<p>and in javascript added the following func:</p>
<p>function comparefunc(sender, args)<br />
{<br />
        var hid = document.getElementById(&#8220;&#8221;);<br />
        var text = document.getElementById(&#8220;&#8221;);</p>
<p>  if (hid.value == text.value)<br />
  {<br />
      //values have not changed<br />
      args.IsValid = true;<br />
      return;<br />
  }</p>
<p>  args.IsValid = false;<br />
  return;<br />
}</p>
<p>Make sense??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/comment-page-1/#comment-14089</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 04 May 2007 22:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.shepherdweb.com/2007/01/30/how-to-point-comparevalidators-controltocompare-attribute-at-a-hiddenfield/#comment-14089</guid>
		<description>I was able to bypass this error by changing my hidden items (I was using two asp:labels) and making them asp:textboxes instead. My problem was due to the fact that asp.net doesn’t know which field to validate when using a label, but a textbox is easy (it’s the text field).

Don’t know if that was the same issue you had, but thanks for the insite.</description>
		<content:encoded><![CDATA[<p>I was able to bypass this error by changing my hidden items (I was using two asp:labels) and making them asp:textboxes instead. My problem was due to the fact that asp.net doesn’t know which field to validate when using a label, but a textbox is easy (it’s the text field).</p>
<p>Don’t know if that was the same issue you had, but thanks for the insite.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

