[Mono-dev] ASP:UpdatePanel with UpdateMode="Conditional" updates always
Vitalii
sirchenko_vitali at ukr.net
Wed Aug 19 09:54:26 EDT 2009
Hi,
I'm facing such a problem:
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>
</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?
--
View this message in context: http://www.nabble.com/ASP%3AUpdatePanel-with-UpdateMode%3D%22Conditional%22-updates-always-tp25044569p25044569.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list