[Mono-bugs] [Bug 649034] New: UpdateProgress doesn't find UpdatePanel inside a userercontrol
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Oct 25 11:48:03 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=649034
https://bugzilla.novell.com/show_bug.cgi?id=649034#c0
Summary: UpdateProgress doesn't find UpdatePanel inside a
userercontrol
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: lnc19 at hotmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR
3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Update progress can't associate to an updatepanale that is inside a user
control.
The folowing pseudo-sample works on windows and not on linux with mono:
<asp:UpdateProgress ID="updateTest" associatedUpdatePanelId="updateMain"
runat="server">
<ProgressTemplate>
Processing...
</ProgressTemplate>
</asp:UpdateProgress>
<cc1:MyControl runat="server" id="MyControlId">
<MyContent>
<asp:UpdatePanel id="updateMain" runat="server">
<ContentTemplate>
Content
</ContentTemplate>
</asp:UpdatePanel>
</MyContent>
</cc1:MyControl>
Reproducible: Always
Steps to Reproduce:
1. Create a user control.
2. Insert and update panel inside the control (The control should implement
ITemplate)
3. Create an UpdateProgress in the page.
4. Assign de AssociatedUpdatePanelId to the update panel (2).
Actual Results:
InvalidOperationException No UpdatePanel found for AssociatedUpdatePanelID...
Expected Results:
Works ok on M$.
In System.Web.Extension.UpdateProgress class on master git is doing something
like
protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors ()
{
string updatePanelClientId;
if (String.IsNullOrEmpty (AssociatedUpdatePanelID))
updatePanelClientId = null;
else {
UpdatePanel updatePanel = FindControl (AssociatedUpdatePanelID)
as UpdatePanel;
if (updatePanel == null)
throw new InvalidOperationException ("No UpdatePanel found
for AssociatedUpdatePanelID '" + AssociatedUpdatePanelID + "'.");
updatePanelClientId = updatePanel.ClientID;
}
ScriptControlDescriptor descriptor = new ScriptControlDescriptor
("Sys.UI._UpdateProgress", this.ClientID);
descriptor.AddProperty ("associatedUpdatePanelId",
updatePanelClientId);
descriptor.AddProperty ("displayAfter", DisplayAfter);
descriptor.AddProperty ("dynamicLayout", DynamicLayout);
yield return descriptor;
}
and it should:
protected virtual IEnumerable<ScriptDescriptor> GetScriptDescriptors ()
{
string updatePanelClientId;
if (String.IsNullOrEmpty (AssociatedUpdatePanelID))
updatePanelClientId = null;
else {
UpdatePanel updatePanel = FindControl (AssociatedUpdatePanelID)
as UpdatePanel;
if (updatePanel == null)
updatePanel = FindUserControl (AssociatedUpdatePanelID)
as UpdatePanel // This method should work recursively
if (updatePanel == null)
throw new InvalidOperationException ("No UpdatePanel found
for AssociatedUpdatePanelID '" + AssociatedUpdatePanelID + "'.");
updatePanelClientId = updatePanel.ClientID;
}
ScriptControlDescriptor descriptor = new ScriptControlDescriptor
("Sys.UI._UpdateProgress", this.ClientID);
descriptor.AddProperty ("associatedUpdatePanelId",
updatePanelClientId);
descriptor.AddProperty ("displayAfter", DisplayAfter);
descriptor.AddProperty ("dynamicLayout", DynamicLayout);
yield return descriptor;
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list