AJAX :: Error - Panes Could Not Be Initialized. Details:Pane Could Not Be Added To The Collection - How To Fix It
Apr 19, 2010
I created the accordion control custom dll and added the dll my project reference. After adding the reference in my project, I just the drag and drop accordion control and added accordion panes, after adding the pane and clicked design view I am getting the following error. Even I added the selected index=0 properties also but I am getting same error
"Panes could not be initialized. Details: Pane could not be added to the collection. Details Object does not match target type.
I'm loading a .aspx page via fancybox (ajax loading mode).I was using fancybox 1.2.6, working fine, then upgraded to fancybox 1.3.4 and IE now triggers the JS error above (in the subject of the post). Then why am I posting on ASP.net forum you might ask?!?... read on...Debugging the JS code, the error happens inside jQuery in the .html(data) function where it does a evalScript .each scripts inside data. jQuery version is 1.4.2.I'm able to resolve the problem by editing fancybox-1.3.4.js at line 265. I just use innerHTML to circuvent the evalScript that occurs inside html()... and it works:
//tmp.html( data ); <-- original code commented out where JS error occured var tmpDiv = tmp.get(0); <-- new "plaster" kind-of fix tmpDiv.innerHTML = data; <-- new "plaster" kind-of fix
Why I'm posting on ASP.net and not on jQuery nor fancybox groups is that I consider that the proper fix would be in the .aspx that is loaded via ajax.To summarize the problem. There is a base .aspx page that has a couples of text and buttons. When you click a button, it loads via AJAX a new .aspx page (using fancybox). You end up with two ScriptManager js code and it triggers an error when executing :
I've inherited some code that is having a serious problem. On one page, there are several pairs of "Yes"/"No" checkboxes that act like pairs of radio buttons through the use of the ACT MutuallyExclusiveCheckBoxExtender control. They work as expected. However, when I navigate away from the page, I get a "Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method." error in the dynamically-generated ScriptResource.ax...c2d9970 [dynamic] file.
The specific method in the dynamically-generated code is: var $removeHandler = Sys.UI.DomEvent.removeHandler = function Sys$UI$DomEvent$removeHandler(element, eventName, handler)
The element is set to any of the checkbox controls (I've removed them one-by-one and it happens to ALLof them) and the eventName is "Click". I gather from the code that it's trying to do a removeHandler before the addHandler for the particular element has taken place. True, I don't have any explicit addHandler lines in my code, but I don't any explicit removeHandler lines either. About all I've got in the aspx code is: [Code] ....
The formatting of the code in this message is a bit weird, but it's basically a simple table with three columns. On each row, there's text in the first column, the checkboxes in the second column and a button in the third. I've searched high and low on the web and nearly every thread I read about his error talks about it in relationship to the use of command buttons in an ACT UpdatePanel.
I am getting error ExecuteReader: Connection property has not been initialized. below is the code i am using.
SqlDataReader oReader = new SqlDataReader(); string sSQL = @" WITH TAB_CTE AS ( SELECT fbominum, fbompart, fparinum, flevel, fsono FROM sodbom WHERE fbompart= @fbompart and fsono = @fsono UNION ALL SELECT e.fbominum, e.fbompart, e.fparinum, e.flevel, e.fsono FROM sodbom e INNER JOIN TAB_CTE ecte ON ecte.fbominum = e.fparinum where e.fsono = @fsono ) SELECT * FROM TAB_CTE where fbompart <> @fbompart "; SqlCommand oCommand = new SqlCommand(sSQL, this._connection); oCommand.CommandType = System.Data.CommandType.Text; oCommand.Parameters.Add("@fbompart", ItemSODBOM.fbompart); oCommand.Parameters.Add("@fsono", ItemSODBOM.SONO); oReader = oCommand.ExecuteReader();//Here I am getting error
I am getting above mentioned error when I try to run the following code:
Private strConnString As String = ConfigurationManager.ConnectionStrings("conString").ConnectionString Private con As New SqlConnection(strConnString) Private pID As Integer 'FIRST SECTION Dim query As String = "query" Dim cmd As New SqlCommand(query)
[Code] .....
The error is coming from the second SQL cmd but if I comment out the first section; the second section runs fine.
I must have made another basic error but I just can't figure out what it is.
public class DataClass{ public DataClass() { } /// <summary> /// return rows depend on position /// if you need 10th to 20th you need to pass start=10 and end=20 /// </summary> /// <param name="start">database start position of one row</param> /// <param name="next">database end position of one row</param> /// <returns></returns> public string GetAjaxContent(int start, int end) {
[code].....
When I'm trying to develop the unlimited scrolling in datalist i have an error like connection string not initialized I checked and rechecked.
So basically when i open the page i get the error above.
I've removed-added the toolkit toolbox.The error occurs p.e. in MaskedEditvalidator when i remove the mask from
MaskedEditExtender.Ok i know that it probably needs a mask and it crashes but what the hell is the
C:UsersswaltherProjectsAspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitMaskedEditMaskedEditCommon.cs ?? I don't even use c: for any project.Who is swalther?WTH?
And is there a MaskedEditCommon.cs in the toolkit?I did not find any MaskedEditCommon.cs in whatever, version library or whatever i downloaded.
Error:[ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex] System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7490863 System.String.Substring(Int32 startIndex, Int32 length)
and it was working well even After I upgraded my wevbsite to .net version 4 but when I started a new website from scratch in vs2010 using .net4 when I use ajax toolkit in this new site it is registered as folowing
and when I run the page I get the error The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>) I don't Know what is the reason for this. I noticed another thing. in my old website I was using thckbox script by using the files common.js, jquery-1.3.2.js,jquery.thickbox.js and puting them in a Javascript folder ad then registering them in Script manager as following
this was working well also but in my new site the jquery file version was jquery-1.4.1.js but also I added the old version f the javascripts files in the built in Scripts folder that is created by default b the new site and followed the same way in registering them in the script managerchange the JavaScript folder to the built in folder Scripts
but this doesn't work also in the new site I think that there is something diffirent in the 2 case which leads to this change in performance I wish your support and advice about how to solve this matter
Hopefully this is just me missing something really simple; I have 3 accordion panes of which the first one is visible on page load but if I click on the other panes nothing happens.
How do I run a function associated with my custom control after it is initialized? So for example, after the control has initialized (ie is loaded) I need to finalize some properties. But since it is composed of a number of other controls, I need to know all the controls are present. I've tried add_load but I can't seem to get the context right to see my contol's specific functions. If I place the onLoad metod in the main class (javascript) definition, the contol id dosen't exist yet, same for in the prototype.
Since the control id dosen't exist yet I need to wait for the load event but now i'm in a chicken and egg problem. How do I create a method of my control class and call it "after" initilization? Seems like a simple question but it hasn't been so easy to find an answer.
I have a accordion control with 4 accordion panes. Initially when the page loads I expand the first accordion pane. Now if the user click the header on the first pane I need to collapse it. ( so in this case all the accordion panes will be collapsed).
Similarly is the user clicks on the header of any alraedy expanded pane, I need to collape that particular pane.
I am creating an accordion dynamically through aspx.cs file. There is a subaccordion inside each accordion pane. I am seeing that if there are 10 or more accordion panes in the root accordion, then I can only expand first 4 or 5 panes. Nothing happens when I click on other panes. This is happening in IE8, tried on three different machines. I don't see this problem with Mozilla, it can open as many panes as possible, I have tried with 20 panes in mozilla.
I have the following problem: I have a web form which contains ajax accordion. Each accordion pane contains a usercontrol. Each usercontrol consists of several textboxes and 2 buttons. All the textboxes and 2 buttons (inside these usercontrols) are wrapped in the UpdatePanel. Following updatepanels is the UpdatePanelAnimationExtender for some animation whithin each usercontrol. Each UpdatePanelAnimationExtender has a different animation id from other usercontrols.
Basically when i only put one usercontrol in the accordion pane everythign works. I have my javascript to clear textboxes and the submit button does a postback to server. However, when i put 2 of these controls in 2 different panes only the last one works. Since the last one works i assume it is because it was last to be parsed on pageLoad. So how can i make it that when user clicks on the accordion pane, the usercontrol is ->?re-initialized?<- so that it could work.
Here is 1st UserControl: uctl1.ascx
[Code]....
Here is 2nd UserControl: uctl2.ascx
[Code]....
when i click on pane and fill up the information in textboxes i click on submit and usercontrol should postback to server for processing.
I want to set focus to textbox B after a user has entered data in textbox A. Both textboxen reside within custom controls which reside in the same accordion pane. The custom controls override the Focus method and set focus to the textbox they contain. Focus works fine until I place the controls inside an accordion pane. I've tried ((ScriptManager)Page.Master.FindControl("ScriptManager1")).SetFocus(TextBoxB) from within the TextBoxA_ValueChanged event handler to no avail.
The problem is accordion's showed on the page, but doesn't works. I try use code of all examples, but the problem is the same for all of them. I don't understand what to do, because the code is the same as in the tutorials. When I click on the pane it doesn't changing/closing/opening. What can it be?
I have an accordion control and it is working fine. Except that when i set selectedindex to -1 (server side) and the control colapses to have no panes expanded. The client side diplay style for the previously expanded pane remains in the expanded colour scheme even though the pane has collapsed.
In the content page, I have an ajax accordion pane with couple of panes. Within each of those panes there is 1 user control. Initially all the panes except the first one (AccordionPaneMain) is enabled. The first pane user control contains a form view . In formview itemcommand I am doing some processing and then was trying to enable rest of the panes by calling the function showPanes in the main page by using invoker method. My problem is, the method (showPanes) is getting executed but the panes are not enabled.