<?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: Disable a button control during postback.</title>
	<atom:link href="http://encosia.com/2007/04/17/disable-a-button-control-during-postback/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 11 Mar 2010 18:05:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mark</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-38124</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 23 Feb 2010 17:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-38124</guid>
		<description>Use a javascript function like the following if you want to disable the button AND still have working client validation, call the function from the OnClientClick attribute:

function CheckSubmit() {
cmdSave = document.getElementById(&#039;cmdSave&#039;);

cmdSave.disabled = true;
originalText = cmdSave.value;
cmdSave.value = &quot;Saving Changes...&quot;;

Page_ClientValidate();

if (!Page_BlockSubmit) {
   cmdSave.value = originalText;
   cmdSave.disabled = false;
  }
}</description>
		<content:encoded><![CDATA[<p>Use a javascript function like the following if you want to disable the button AND still have working client validation, call the function from the OnClientClick attribute:</p>
<p>function CheckSubmit() {<br />
cmdSave = document.getElementById(&#8216;cmdSave&#8217;);</p>
<p>cmdSave.disabled = true;<br />
originalText = cmdSave.value;<br />
cmdSave.value = &#8220;Saving Changes&#8230;&#8221;;</p>
<p>Page_ClientValidate();</p>
<p>if (!Page_BlockSubmit) {<br />
   cmdSave.value = originalText;<br />
   cmdSave.disabled = false;<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-38049</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 16 Feb 2010 19:21:09 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-38049</guid>
		<description>Works like a charm, was looking for this for a long time.  Such a simple solution. :)</description>
		<content:encoded><![CDATA[<p>Works like a charm, was looking for this for a long time.  Such a simple solution. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-37870</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Tue, 26 Jan 2010 20:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-37870</guid>
		<description>Brilliant, thanks for sharing such an easy solution to a common problem!</description>
		<content:encoded><![CDATA[<p>Brilliant, thanks for sharing such an easy solution to a common problem!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ancalagon</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-37717</link>
		<dc:creator>Ancalagon</dc:creator>
		<pubDate>Thu, 31 Dec 2009 16:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-37717</guid>
		<description>Nice, Clean, Simple!</description>
		<content:encoded><![CDATA[<p>Nice, Clean, Simple!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Gaigg</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-36948</link>
		<dc:creator>Michael Gaigg</dc:creator>
		<pubDate>Wed, 04 Nov 2009 15:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-36948</guid>
		<description>Here is a code sample that shows how to the submit button on submission of the form without breaking the client-side validation of .net: http://www.mgitsolutions.com/blog/2009/10/27/how-to-disable-button-on-form-submit-in-net/</description>
		<content:encoded><![CDATA[<p>Here is a code sample that shows how to the submit button on submission of the form without breaking the client-side validation of .net: <a href="http://www.mgitsolutions.com/blog/2009/10/27/how-to-disable-button-on-form-submit-in-net/" rel="nofollow">http://www.mgitsolutions.com/blog/2009/10/27/how-to-disable-button-on-form-submit-in-net/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hank</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-36778</link>
		<dc:creator>Hank</dc:creator>
		<pubDate>Fri, 16 Oct 2009 20:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-36778</guid>
		<description>YOU JUST SAVED ME 1 DAY OF FRUSTRATION WITH THIS.... can&#039;t believe this little property was the root of my problem!!!</description>
		<content:encoded><![CDATA[<p>YOU JUST SAVED ME 1 DAY OF FRUSTRATION WITH THIS&#8230;. can&#8217;t believe this little property was the root of my problem!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-36753</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Wed, 14 Oct 2009 01:20:36 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-36753</guid>
		<description>You can use something like jQuery&#039;s BlockUI to do that.  See this post for some details:  http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/</description>
		<content:encoded><![CDATA[<p>You can use something like jQuery&#8217;s BlockUI to do that.  See this post for some details:  <a href="http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/" rel="nofollow">http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cha</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-36747</link>
		<dc:creator>Cha</dc:creator>
		<pubDate>Tue, 13 Oct 2009 17:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-36747</guid>
		<description>Thanks. Your solution worked perfectly. Just out of curiosity, is there a way to do the same thing while also displaying a label on top of the page saying &quot;Processing...&quot;?</description>
		<content:encoded><![CDATA[<p>Thanks. Your solution worked perfectly. Just out of curiosity, is there a way to do the same thing while also displaying a label on top of the page saying &#8220;Processing&#8230;&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noman Shiahd</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-36093</link>
		<dc:creator>Noman Shiahd</dc:creator>
		<pubDate>Sat, 08 Aug 2009 11:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-36093</guid>
		<description>thanks MR.Dave Ward 
its Work
From
Muhammad Noman Shahid
Pakistan</description>
		<content:encoded><![CDATA[<p>thanks MR.Dave Ward<br />
its Work<br />
From<br />
Muhammad Noman Shahid<br />
Pakistan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-35575</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Mon, 15 Jun 2009 14:55:08 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-35575</guid>
		<description>With LinkButtons, there&#039;s no client-side &quot;disabled&quot; property like with regular Button contracts.  What you can do is replace this in the example above:

&lt;pre lang=&quot;javascript&quot;&gt;OnClientClick=&quot;this.disabled = true; this.value = &#039;Submitting...&#039;;&quot;&lt;/pre&gt;

With this:

&lt;pre lang=&quot;javascript&quot;&gt;OnClientClick=&quot;this.href = &#039;#&#039;;&quot;&lt;/pre&gt;

And it will effectively disable the link after it is clicked once.</description>
		<content:encoded><![CDATA[<p>With LinkButtons, there&#8217;s no client-side &#8220;disabled&#8221; property like with regular Button contracts.  What you can do is replace this in the example above:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">OnClientClick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;this.disabled = true; this.value = 'Submitting...';&quot;</span></pre></div></div>

<p>With this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">OnClientClick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;this.href = '#';&quot;</span></pre></div></div>

<p>And it will effectively disable the link after it is clicked once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: har</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-35489</link>
		<dc:creator>har</dc:creator>
		<pubDate>Fri, 05 Jun 2009 20:52:45 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-35489</guid>
		<description>i am creating link button dynamically, which calls few COM operations. How can i prevent user to click multiple times on the link button?</description>
		<content:encoded><![CDATA[<p>i am creating link button dynamically, which calls few COM operations. How can i prevent user to click multiple times on the link button?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ricbax</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-35208</link>
		<dc:creator>ricbax</dc:creator>
		<pubDate>Tue, 05 May 2009 20:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-35208</guid>
		<description>Removed the OnClick=&quot;BtnSubmit_Click&quot; and it worked for me. Thanks!</description>
		<content:encoded><![CDATA[<p>Removed the OnClick=&#8221;BtnSubmit_Click&#8221; and it worked for me. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hungster</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-34979</link>
		<dc:creator>hungster</dc:creator>
		<pubDate>Fri, 17 Apr 2009 10:03:32 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-34979</guid>
		<description>thanks! this is the best and easiest solution i have found.</description>
		<content:encoded><![CDATA[<p>thanks! this is the best and easiest solution i have found.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: natalie</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-34769</link>
		<dc:creator>natalie</dc:creator>
		<pubDate>Sun, 05 Apr 2009 21:39:20 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-34769</guid>
		<description>wait--the second part of that code is a form:

     </description>
		<content:encoded><![CDATA[<p>wait&#8211;the second part of that code is a form:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: natalie</title>
		<link>http://encosia.com/2007/04/17/disable-a-button-control-during-postback/#comment-34768</link>
		<dc:creator>natalie</dc:creator>
		<pubDate>Sun, 05 Apr 2009 21:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/04/17/disable-a-button-control-during-postback/#comment-34768</guid>
		<description>This is really helpful.  I am too much of a n00b to get it to work for me, though.  I have a different kind of button, that shows text at distinct time points.  You click the button once and then it displays a sentence, then it pauses, then it displays a different sentence.  I don&#039;t want the client to be able to see the sentences more than once, so I am trying to disable the button w/o preventing the sentences from being shown.  All my attempts disable the button completely so the client never sees anything.  This is the basic code w/o anything to disable.  Where can I put the right function or line of code to disable the button while still allowing the text to display one time?  THANKS for any help.

function timedText() { var t1=setTimeout(&quot;document.getElementById(&#039;txt&#039;).value=&#039;Chinese Sentence&#039;&quot;,0); var t2=setTimeout(&quot;document.getElementById(&#039;txt&#039;).value=&#039;XXXXXXX&#039;&quot;,3000);  }



     

</description>
		<content:encoded><![CDATA[<p>This is really helpful.  I am too much of a n00b to get it to work for me, though.  I have a different kind of button, that shows text at distinct time points.  You click the button once and then it displays a sentence, then it pauses, then it displays a different sentence.  I don&#8217;t want the client to be able to see the sentences more than once, so I am trying to disable the button w/o preventing the sentences from being shown.  All my attempts disable the button completely so the client never sees anything.  This is the basic code w/o anything to disable.  Where can I put the right function or line of code to disable the button while still allowing the text to display one time?  THANKS for any help.</p>
<p>function timedText() { var t1=setTimeout(&#8220;document.getElementById(&#8216;txt&#8217;).value=&#8217;Chinese Sentence&#8217;&#8221;,0); var t2=setTimeout(&#8220;document.getElementById(&#8216;txt&#8217;).value=&#8217;XXXXXXX&#8217;&#8221;,3000);  }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
