473,763 Members | 6,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#-Web: Cannot unregister updatepanel with ID XXX since it was not registered ....

4 New Member
Hi,

I need to add a 'WebDialog' component on to a webpage everytime a user clicks on a button.

This is the error I'm getting: Cannot unregister UpdatePanel with ID 'dialog0_Update Container' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel

I get the error here: PlaceHolder1.Co ntrols.Add(myDi alog);

Here is my code behind(c#):

public partial class MultipleWindows : System.Web.UI.P age
{
ArrayList arrayList;

protected void Page_Load(objec t sender, EventArgs e)
{
arrayList = (ArrayList)Sess ion["dialogs"];
if (arrayList == null)
{
arrayList = new ArrayList();
}
}

public void Button_OnClick( Object sender, System.EventArg s e)
{
//Create new web dialog
C1WebDialog dialog = new C1WebDialog();
dialog.ContentU rl = TextBox1.Text;

//Set the id
int len = arrayList.Count ;
dialog.ID = "dialog" + len;

//add it to the collection of Dialogs
arrayList.Add(d ialog);
Session["dialogs"] = arrayList;

//loop thru collection of dialogs and paint each one out
for(int index=0; index<arrayList .Count;index++)
{
C1WebDialog myDialog = (C1WebDialog)ar rayList[index];

// Add to the page's controls
PlaceHolder1.Co ntrols.Add(myDi alog);

// Set open dialog handler
HyperLink HyperLink1 = new HyperLink();
HyperLink1.Navi gateUrl = String.Format(" javascript:open Window($get(\"{ 0}\"));", myDialog.Client ID);
}

}


}

Here is page code:

<%@ Page Language="C#" AutoEventWireup ="true" CodeFile="Multi pleWindows.aspx .cs" Inherits="Multi pleWindows" %>
<%@ Register Assembly="C1.We b.C1WebDialog.2 " Namespace="C1.W eb.C1WebDialog" TagPrefix="c1d" %>


<html>

<head runat="server">
<script type="text/javascript">
var form_dialog;
function openWindow(dial og)
{
form_dialog = dialog.control;
dialog.control. show();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptMana ger ID="ScriptManag er1" runat="server"> </asp:ScriptManag er>
<asp:PlaceHolde r ID="PlaceHolder 1" runat="server"> </asp:PlaceHolder >
<asp:TextBox ID="TextBox1" runat="server" Text="http://www.yahoo.com"> </asp:TextBox>&nb sp;&nbsp;
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button _OnClick"/>
</div>
</form>

</body>
</html>


Any ideas anyone?
Thanks
Jan 23 '08 #1
0 5018

Sign in to post your reply or Sign up for a free account.

Similar topics

9
2071
by: Ricky Jones | last post by:
Is there any way to unregister a ActivatedClientType? thanks, Ricky Jones
5
1850
by: richard.tallent | last post by:
I'm fond of web controls in ASP.NET, but the need for <@ Register%> blocks at the top of each page is a pain. ASP.NET 2.0 has a way to centrally register controls in the web.config file, but it is poorly documented and appears to be broken. I have added my standard user controls to my web.config file. The MSDN examples are flat wrong, by the way (bad XML case and attribute names, won't compile). The proper syntax for registering server...
16
12737
by: Heinz K | last post by:
Hello all, I'm developing a vb.net 2.0 webservice which accesses a lotus notes database using lotus domino api. This works fine on my local client if I select "Use Visual Studio Development server" (on project properties). But as soon as I select "Use IIS Web Server" I always got error messages. One says: "Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error:...
2
15071
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have been able to find the cause of the problem, and will describe it here first textually and then through a code example. The purpose of what I am trying to do is to create a postback-free web application through the use of ASP.net AJAX UpdatePanels...
3
1481
by: =?Utf-8?B?UmljaA==?= | last post by:
I created a custom dll to use .net objects in com environment. It works fine. Then I copied the dll to another workstation and manually registered it, and it works fine there also. Now I need to unregister this dll on that workstation so I can test if Click Once deployment will deploy the dll with a com app I am deploying. How to unregister this dll from that workstation? Thanks, Rich
1
3205
by: =?Utf-8?B?U3Rvcm1icmluZ2Vy?= | last post by:
I have an UpdatePanel with a dropdown list that I can't seem to get to update. It has a hidden button which I click from javascript added to the page when another update panel is updated. Triggers didn't work for this that is why I'm using the script. The script is registered with... ScriptManager.RegisterStartupScript(Page, GetType(), "Update", String.Format("$get('{0}').click();", buttontoclick.ClientID), true); <asp:UpdatePanel...
5
12608
by: Leon Mayne | last post by:
Having a bit of trouble here. I know that if you want to use a fileupload control inside an AJAX update panel then you need to create a trigger for the control that performs the uploading postback to the updatepanel, but the problem is, I have an update panel inside a web usercontrol, and the usercontrol is sitting inside an updatepanel on the host page. I therefore can't add a trigger to the control directly, as the host page has no access...
1
4061
by: jack | last post by:
Hi folks, I got a custom control, in which it's placed inside the UpdatePanel. The control contains some LinkButtons which post back to the same page. Actually, when these LinkButtons are clicked, the entire page is refreshed which is not the desired effect. I only need the UpdatePanel to be refreshed. So, I decided to search the net to solve the issue. I just found that when the LinkButtons are registered for the PostBacks, the...
2
3906
by: eebee | last post by:
Hi, I've been trying for a few hours now, but cannot resolve this: In IE7 it works, but not in : I'm using a HoverMenuExtender in a Listview. As soon as I'm using an updatepanel, the popup doesn't shows anymore in safari or goggle chrome, it still works in IE7. Without the updatepanel it works fine in all 3 browsers.
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.