Wednesday, March 28, 2012

Multiple UpdateProgress controls not possible?

Hi,

I'm currently learning ASP.NET AJAX. I wanted to play around with the different settings of the DynamicLayout property of the UpdateProgress control. I dragged from the toolbox a scriptmanager, updatepanel and 2 updateprogress controls on the same page.

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="UpdateProgress2.aspx.cs" Inherits="UpdateProgress2" %><!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 runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> </div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress1" runat="server"> </asp:UpdateProgress> <asp:UpdateProgress ID="UpdateProgress2" runat="server"> </asp:UpdateProgress> </form></body></html>

However this results for the second updateprogress control into this error message:Duplicate component name "UpdateProgress2". Component names must be unique and case-insensitive. Am I trying something stupid/not allowed?

Grz, Kris.

Does the error go away if you change the ID of the second UpdateProgress? I notice that your codebehind class happens to be called "UpdateProgress2" as well, and that's not allowed.

I get a different error message for that, though: "member names cannot be the same as their enclosing type," so it's possible that's not the same error you're seeing.


Hi,

thanks! Renaming solved it. Man, I told you I was probably doing something stupidEmbarrassed. I was so focussed on learning the new stuff that I missed that one.

Grz, Kris.

No comments:

Post a Comment