<?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: Automatic Sequential Postbacks</title>
	<atom:link href="http://encosia.com/automatic-sequential-postbacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/automatic-sequential-postbacks/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:50:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: jiang peng</title>
		<link>http://encosia.com/automatic-sequential-postbacks/#comment-39286</link>
		<dc:creator>jiang peng</dc:creator>
		<pubDate>Thu, 01 Jul 2010 07:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/02/02/automatic-sequential-postbacks/#comment-39286</guid>
		<description>All_OnClick could be shorten.
 &lt;pre lang=&quot;csharp&quot;&gt;code
    protected void All_OnClick(object sender, EventArgs e)
    {
        EnableSubmitScript(0);
    }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>All_OnClick could be shorten.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">code
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> All_OnClick<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        EnableSubmitScript<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: jiang peng</title>
		<link>http://encosia.com/automatic-sequential-postbacks/#comment-39285</link>
		<dc:creator>jiang peng</dc:creator>
		<pubDate>Thu, 01 Jul 2010 07:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/02/02/automatic-sequential-postbacks/#comment-39285</guid>
		<description>Interesting Skill, thank you</description>
		<content:encoded><![CDATA[<p>Interesting Skill, thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vishal Jani</title>
		<link>http://encosia.com/automatic-sequential-postbacks/#comment-36637</link>
		<dc:creator>Vishal Jani</dc:creator>
		<pubDate>Tue, 06 Oct 2009 08:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/02/02/automatic-sequential-postbacks/#comment-36637</guid>
		<description>Tone of thanks

Regards,
Vishal Jani</description>
		<content:encoded><![CDATA[<p>Tone of thanks</p>
<p>Regards,<br />
Vishal Jani</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/automatic-sequential-postbacks/#comment-20</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Thu, 15 Feb 2007 17:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/02/02/automatic-sequential-postbacks/#comment-20</guid>
		<description>It&#039;s because the ViewState persists the last body.OnLoad attribute added even after the final postback when it isn&#039;t explicitly added.  In live use, I use this extra code for All_OnClick:

&lt;pre lang=&quot;csharp&quot;&gt;protected void Repeater1_OnCommand(object source, RepeaterCommandEventArgs e)
{
  ProcessItem(e.Item.ItemIndex);

  if (Request.Form[&quot;__EventArgument&quot;] == &quot;Multi&quot;)
  {
    if (e.Item.ItemIndex &lt; Repeater1.Items.Count - 1)
      EnableSubmitScript(e.Item.ItemIndex + 1);
    else
      DisableSubmitScript();
  }
}&lt;/pre&gt;

DisableSubmitScript is just a call to body.Attributes.Clear() in my case.  I omitted it from this example to reduce the complexity a bit.</description>
		<content:encoded><![CDATA[<p>It&#8217;s because the ViewState persists the last body.OnLoad attribute added even after the final postback when it isn&#8217;t explicitly added.  In live use, I use this extra code for All_OnClick:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Repeater1_OnCommand<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> source, RepeaterCommandEventArgs e<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
  ProcessItem<span style="color: #000000;">&#40;</span>e.<span style="color: #0000FF;">Item</span>.<span style="color: #0000FF;">ItemIndex</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
  <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>Request.<span style="color: #0000FF;">Form</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;__EventArgument&quot;</span><span style="color: #000000;">&#93;</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;Multi&quot;</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>e.<span style="color: #0000FF;">Item</span>.<span style="color: #0000FF;">ItemIndex</span> <span style="color: #008000;">&lt;</span> Repeater1.<span style="color: #0000FF;">Items</span>.<span style="color: #0000FF;">Count</span> <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span>
      EnableSubmitScript<span style="color: #000000;">&#40;</span>e.<span style="color: #0000FF;">Item</span>.<span style="color: #0000FF;">ItemIndex</span> <span style="color: #008000;">+</span> <span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF;">else</span>
      DisableSubmitScript<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>DisableSubmitScript is just a call to body.Attributes.Clear() in my case.  I omitted it from this example to reduce the complexity a bit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://encosia.com/automatic-sequential-postbacks/#comment-19</link>
		<dc:creator>david</dc:creator>
		<pubDate>Thu, 15 Feb 2007 17:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/02/02/automatic-sequential-postbacks/#comment-19</guid>
		<description>your example errors on the last cycle of button 1</description>
		<content:encoded><![CDATA[<p>your example errors on the last cycle of button 1</p>
]]></content:encoded>
	</item>
</channel>
</rss>

