<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>If an EventHandler is called twice...</title><link>http://blogs.msdn.com/carloc/archive/2007/03/28/if-an-eventhandler-is-called-twice.aspx</link><description>...take a close look at your code . This comes from a case I worked on in the last couple of days: a customer reported a problem in one of his ASP.NET 2.0 pages, which is meant to perform some sort "long running" operation on the server. What puzzled</description><dc:language>it-IT</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: If an EventHandler is called twice...</title><link>http://blogs.msdn.com/carloc/archive/2007/03/28/if-an-eventhandler-is-called-twice.aspx#2589266</link><pubDate>Sun, 13 May 2007 06:24:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2589266</guid><dc:creator>Lewis</dc:creator><description>&lt;p&gt;I ran into the same problem, when the client clicks on the button on a grid view they will confim if they wish to delete the file. If they click ok it fires the click event for the button. Then it fires the event again for some reason i added everything using the property field and the template editor. Here is the code.&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; CommandArgument='&amp;lt;%# Eval(&amp;quot;UserName&amp;quot;) %&amp;gt;'&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CommandName=&amp;quot;DeleteUser&amp;quot; Text=&amp;quot;Delete user&amp;quot; OnClientClick=&amp;quot;return confirm('Are you sure you want to delete this User?')&amp;quot; /&amp;gt;&lt;/p&gt;</description></item><item><title>re: If an EventHandler is called twice...</title><link>http://blogs.msdn.com/carloc/archive/2007/03/28/if-an-eventhandler-is-called-twice.aspx#2595256</link><pubDate>Sun, 13 May 2007 11:35:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2595256</guid><dc:creator>Carlo Cardella</dc:creator><description>&lt;p&gt;Hi Lewis, with a simple test on my machine I can't repro the problem so I can't tell you exactly what's going on in your app, sorry; but I can suggest you to have a look at the HTML code in IE (&amp;quot;view source&amp;quot;) and try to identify if there is any &amp;quot;duplicated&amp;quot; javascript code which may submit the page twice.&lt;/p&gt;
&lt;p&gt;HTH&lt;/p&gt;
</description></item><item><title>re: If an EventHandler is called twice...</title><link>http://blogs.msdn.com/carloc/archive/2007/03/28/if-an-eventhandler-is-called-twice.aspx#9066321</link><pubDate>Thu, 13 Nov 2008 17:38:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9066321</guid><dc:creator>David Day</dc:creator><description>&lt;p&gt;I have a similar issue. &amp;nbsp;A vanilla aspx page: a message with a single button which is sent as an email to the client. &amp;nbsp;When the button is clicked in Outlook, we get two server calls. &amp;nbsp;The first, using the debugger, has all the data in it. &amp;nbsp;The second is empty. &amp;nbsp;Sadly it's the second one which gets rendered. &amp;nbsp;The correct page processing is lost. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The calls are in different sessions - so no ViewState or Session fiddling can be employed. &amp;nbsp;Trying to figure out what is triggering the second call and where it is coming from. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is no javascript in the email page. &amp;nbsp;Submit behaviour is used, and autowireup, but there are no events wired in.&lt;/p&gt;</description></item><item><title>re: If an EventHandler is called twice...</title><link>http://blogs.msdn.com/carloc/archive/2007/03/28/if-an-eventhandler-is-called-twice.aspx#9068681</link><pubDate>Fri, 14 Nov 2008 10:39:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9068681</guid><dc:creator>Carlo Cardella</dc:creator><description>&lt;p&gt;David, do you actually mean OWA or the full Outlook client? Which is the correlation between the aspx page and Outlook?&lt;/p&gt;
</description></item></channel></rss>