[Mono-dev] ASP:UpdatePanel with UpdateMode="Conditional" updates always

Marek Habersack grendel at twistedcode.net
Mon Aug 24 02:41:01 EDT 2009


Vitalii wrote:
> Hi,
> 
> I'm facing such a problem:
https://bugzilla.novell.com/show_bug.cgi?id=532064

The situation (and the answer) haven't changed since, Vitalii - it is not reproducible with latest 
Mono, so use the latest. It was a bug in System.Web.Extensions which is resolved now.

marek
> 
> ASP:UpdatePanel with UpdateMode="Conditional" updates always, though no
> child
> controls caused postback, and no triggers were defined.
> The are two UpdatePanels on a form. The child control of one UpdatePanel
> causes
> postback, that's why only this panel should be updated. On windows it works
> fine. But with mono both panels are updated.
> 
> Here is my page:
> 
> <%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs"
> EnableEventValidation="false"
>     Inherits="MONO_Ajax_Test._Default" %>
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> 
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head id="Head1" runat="server">
>     <script src="js/jquery.js" type="text/javascript"></script>
> </head>
> <body>
>     <form id="form1" runat="server">
>     <div>
>         &nbsp;</div>
>     <asp:ScriptManager ID="MainScriptManager" runat="server"
> EnablePageMethods="true">
>     </asp:ScriptManager>
>     <script language="javascript" type="text/javascript">  	
>     	$(document).ready(function() {
>     		ref = setInterval('UpdPanelUpdate()', 4000);
>     	});
>     </script>
>     
>     <script type="text/javascript">
>     	function UpdPanelUpdate() {
>     		var button = document.getElementById("<%= button.ClientID %>");
>     		button.click();
>     	}
> 	</script>
> 	
>         <table>
>             <tr>
>                 <td style="height: 206px" valign="top">
>                     <asp:UpdatePanel ID="InsertEmployeeUpdatePanel"
> runat="server" UpdateMode="Conditional">
>                         <ContentTemplate>
>                           <asp:Label runat="server"
> ID="InputTimeLabel"><%=DateTime.Now %></asp:Label>
>                         </ContentTemplate>
>                     </asp:UpdatePanel>
>                 </td>
>                 <td style="height: 206px" valign="top">
>                     <asp:UpdatePanel ID="EmployeesUpdatePanel"
> runat="server" UpdateMode="Conditional">
>                         <ContentTemplate>
>                             <asp:Label runat="server"
> ID="ListTimeLabel"><%=DateTime.Now %></asp:Label>
>                             <asp:Button ID="button" runat="server" 
> OnClick="button_Click" style="display:none;"/>
>                         </ContentTemplate>
>                     </asp:UpdatePanel>
>                 </td>
>             </tr>
>         </table>
>     </form>
> </body>
> </html>
> 
> and Code Behind:
> 
> using System;
> using System.Data;
> using System.Configuration;
> using System.Collections;
> using System.Web;
> using System.Web.Security;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.WebControls.WebParts;
> using System.Web.UI.HtmlControls;
> using System.Collections.Generic;
> 
> namespace MONO_Ajax_Test
> {
>     public partial class _Default : System.Web.UI.Page
>     {
> 
>         protected void Page_Load(object sender, EventArgs e)
>         {
>         }
> 
>         protected void button_Click(object sender, EventArgs e)
>         {
>         }
>     }
> }
> 
> What can cause such a problem?



More information about the Mono-devel-list mailing list