Hello,
I’m creating docks dynamically and store them in a database. It’s based on your example “PortalSiteCS”.
Every dock has 4 DockCommand, every dock loads his UserControl. The user can create the same dock on the page as many times as he wish. Every dock gets an uniqe id.
I get an error “Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.”. This error don’t raises every time. Also sometimes I get an error that says that the id of two docks is the same but if I debug it I see a different id. This error raises when I move the dock from one zone to another zone (left and right).
Is it an error in Prometheus docks?
We can’t lunch our site for bate testing with this bug.
Thanks,
Shimon Shed
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{
int index = args.TargetControlID.LastIndexOf("_");
string elementId = args.TargetControlID.Substring(index + 1);
decimal testId;
if (decimal.TryParse(elementId, out testId))
{
this.UpdateToolTip(testId, args.UpdatePanel);
}
}
private void UpdateToolTip(decimal testId, UpdatePanel panel)
{
Control control = Page.LoadControl("~/Controls/Preview/testPreview.ascx");
panel.ContentTemplateContainer.Controls.Add(control);
Mycontrol testtPreview = (Mycontrol)control;
((Mycontrol)control).testId = testId;
}
Thanks.
Text 1
Text 2
Text 3
I am getting extra break in RADEditor.Text 1
Text 2
Text 3
| <script type="text/javascript"> |
| <!-- |
| Sys.Application.initialize(); |
| // --> |
| </script> |
| <script type="text/javascript" src="/WebResource.axd?d=Rwcj_e_oC51iOBYh5MayVggtEnmeLfDRSNuJo6MdksaVrQcOvlTrHPUesRdJLOMXq_vmG2D71BdnK7UY7N_ma5uRITJLgmLNvwzBUET2eQk1&t=633171735402723143"></script><script type="text/javascript">try {var oboutSMbreakMenu = new SlideMenu("breakMenu", null, 10, false, "SMParent", "SMParentOver", "SMParentSelected", "SMChild", "SMChildOver", "SMChildSelected", "SMMenu", "SMChildrenBox", null, null, null, null, null, null, "SMImageParent", "SMImageChild", 100, 0, null, false);} catch(e) {}function f_breakMenu() {var i, j, o, oc, ob;o = document.getElementById("breakMenu");for(i = 0; i < o.childNodes.length; i++) {ooc = o.childNodes[i];if(oc.id.substring(0, 2) != "__") {oc.onmouseover = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 1, true);};oc.onmouseout = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 0, true);};if(oc.onclick) {oboutSMbreakMenu.addFunction(oc.onclick, oc.id);oc.onclick = function() {oboutSMbreakMenu.parentClick(this.id); oboutSMbreakMenu.getFunction(this.id)();};oc.firstChild.onclick = function() {oboutSMbreakMenu.parentClick(this.parentElement.id); oboutSMbreakMenu.getFunction(this.parentElement.id)();};}else {oc.onclick = function() {oboutSMbreakMenu.parentClick(this.id);};oc.firstChild.onclick = function() {oboutSMbreakMenu.parentClick(this.parentElement.id);};}} else for(j = 0; j < oc.childNodes.length; j++) {ob = oc.childNodes[j];ob.onmouseover = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 4, true);};ob.onmouseout = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 3, true);};if(ob.onclick) {oboutSMbreakMenu.addFunction(ob.onclick, ob.id);ob.onclick = function() {oboutSMbreakMenu.saveHidden(this.id); oboutSMbreakMenu.getFunction(this.id)();};}else ob.onclick = function() {oboutSMbreakMenu.saveHidden(this.id);};}}oboutSMbreakMenu.buildMenu();}f_breakMenu();</script> |
| <script type="text/javascript"> |
| <!-- |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSlidingPane, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testSlidingPane_ClientState","Title":"sliding pane","_index":0}, null, {"parent":"ctl00_pageContentPlaceHolder_testSlidingZone","parentPane":"ctl00_pageContentPlaceHolder_testPane","splitter":"ctl00_pageContentPlaceHolder_testSplitter"}, $get("ctl00_pageContentPlaceHolder_testSlidingPane")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSlidingZone, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testSlidingZone_ClientState","_height":"100%","_width":"22px"}, null, {"parent":"ctl00_pageContentPlaceHolder_testPane","splitter":"ctl00_pageContentPlaceHolder_testSplitter"}, $get("ctl00_pageContentPlaceHolder_testSlidingZone")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadPane, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testPane_ClientState","Scrolling":4,"_collapsedDirection":1,"_expandedSize":0,"_height":"400px","_index":0,"_indexInPanes":0,"_originalHeight":400,"_originalWidth":0,"_scrollLeft":0,"_scrollTop":0,"_width":""}, null, {"parent":"ctl00_pageContentPlaceHolder_testSplitter","splitter":"ctl00_pageContentPlaceHolder_testSplitter"}, $get("ctl00_pageContentPlaceHolder_testPane")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSplitter, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testSplitter_ClientState","_borderSize":1,"_panesBorderSize":1}, null, null, $get("ctl00_pageContentPlaceHolder_testSplitter")); |
| }); |
| // --> |
| </script> |
| <script type="text/javascript"> |
| <!-- |
| Sys.Application.initialize(); |
| // --> |
| </script> |
| <script type="text/javascript"> |
| <!-- |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSlidingPane, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testSlidingPane_ClientState","Title":"sliding pane","_index":0}, null, {"parent":"ctl00_pageContentPlaceHolder_testSlidingZone","parentPane":"ctl00_pageContentPlaceHolder_testPane","splitter":"ctl00_pageContentPlaceHolder_testSplitter"}, $get("ctl00_pageContentPlaceHolder_testSlidingPane")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSlidingZone, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testSlidingZone_ClientState","_height":"100%","_width":"22px"}, null, {"parent":"ctl00_pageContentPlaceHolder_testPane","splitter":"ctl00_pageContentPlaceHolder_testSplitter"}, $get("ctl00_pageContentPlaceHolder_testSlidingZone")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadPane, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testPane_ClientState","Scrolling":4,"_collapsedDirection":1,"_expandedSize":0,"_height":"400px","_index":0,"_indexInPanes":0,"_originalHeight":400,"_originalWidth":0,"_scrollLeft":0,"_scrollTop":0,"_width":""}, null, {"parent":"ctl00_pageContentPlaceHolder_testSplitter","splitter":"ctl00_pageContentPlaceHolder_testSplitter"}, $get("ctl00_pageContentPlaceHolder_testPane")); |
| }); |
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadSplitter, {"ClientStateFieldID":"ctl00_pageContentPlaceHolder_testSplitter_ClientState","_borderSize":1,"_panesBorderSize":1}, null, null, $get("ctl00_pageContentPlaceHolder_testSplitter")); |
| }); |
| // --> |
| </script> |
| <script type="text/javascript" src="/WebResource.axd?d=Rwcj_e_oC51iOBYh5MayVggtEnmeLfDRSNuJo6MdksaVrQcOvlTrHPUesRdJLOMXq_vmG2D71BdnK7UY7N_ma5uRITJLgmLNvwzBUET2eQk1&t=633171735402723143"></script><script type="text/javascript">try {var oboutSMbreakMenu = new SlideMenu("breakMenu", null, 10, false, "SMParent", "SMParentOver", "SMParentSelected", "SMChild", "SMChildOver", "SMChildSelected", "SMMenu", "SMChildrenBox", null, null, null, null, null, null, "SMImageParent", "SMImageChild", 100, 0, null, false);} catch(e) {}function f_breakMenu() {var i, j, o, oc, ob;o = document.getElementById("breakMenu");for(i = 0; i < o.childNodes.length; i++) {ooc = o.childNodes[i];if(oc.id.substring(0, 2) != "__") {oc.onmouseover = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 1, true);};oc.onmouseout = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 0, true);};if(oc.onclick) {oboutSMbreakMenu.addFunction(oc.onclick, oc.id);oc.onclick = function() {oboutSMbreakMenu.parentClick(this.id); oboutSMbreakMenu.getFunction(this.id)();};oc.firstChild.onclick = function() {oboutSMbreakMenu.parentClick(this.parentElement.id); oboutSMbreakMenu.getFunction(this.parentElement.id)();};}else {oc.onclick = function() {oboutSMbreakMenu.parentClick(this.id);};oc.firstChild.onclick = function() {oboutSMbreakMenu.parentClick(this.parentElement.id);};}} else for(j = 0; j < oc.childNodes.length; j++) {ob = oc.childNodes[j];ob.onmouseover = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 4, true);};ob.onmouseout = function() {oboutSMbreakMenu.mouseOverOutSelected(this.id, 3, true);};if(ob.onclick) {oboutSMbreakMenu.addFunction(ob.onclick, ob.id);ob.onclick = function() {oboutSMbreakMenu.saveHidden(this.id); oboutSMbreakMenu.getFunction(this.id)();};}else ob.onclick = function() {oboutSMbreakMenu.saveHidden(this.id);};}}oboutSMbreakMenu.buildMenu();}f_breakMenu();</script> |