Prev: Ajax PageRequestManagerServerErrorException unknown error afterappliocation is idle
Next: The compiler failed with error code -1073741502.
From: Nate on 12 Sep 2007 19:20 Hi All - My Accordion control works fine until I move it into a master page; Does anybody have an example of an Accordion control working entirely in the masterpage.master file? When I check the client src generated i find: // this works on Default.aspx //<![CDATA[ Sys.WebForms.PageRequestManager._initialize('Scriptmanager1', document.getElementById('form1')); Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); //]]> // this page does not function //<![CDATA[ Sys.WebForms.PageRequestManager._initialize('ctl00$Scriptmanager1', document.getElementById('aspnetForm')); Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); //]]>
From: Nate on 12 Sep 2007 20:50 I am still testing... this page works: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default6.aspx.cs" Inherits="Default6" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!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"> <asp:ScriptManager ID="Scriptmanager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager> <script language="javascript" type="text/javascript"> function Openpane(paneIndex,eventElement) { var behavior = $get("Accordion1").AccordionBehavior; behavior.set_SelectedIndex(paneIndex); } </script> <cc1:Accordion ID="Accordion1" runat="server" ContentCssClass="dimgreen" FadeTransitions="false" FramesPerSecond="25" TransitionDuration="250" HeaderCssClass="grey" EnableViewState="false" SelectedIndex="-1" SuppressHeaderPostbacks="true"> <Panes> <cc1:AccordionPane runat="server" ID="PaneOne"> <Header> <span onmouseover="Openpane('0',event)">Accordion</span> </Header> <Content> <br /> <br /> Expand Accordion Panes on Mouse Over :: Pane 1 <br /> <br /> </Content> </cc1:AccordionPane> <cc1:AccordionPane runat="server" ID="AccordionPane1"> <Header> <span onmouseover="Openpane('1',event)">Open Panes</span> </Header> <Content> <br /> <br /> Expand Accordion Panes on Mouse Over :: Pane 2 <br /> <br /> </Content> </cc1:AccordionPane> <cc1:AccordionPane runat="server" ID="AccordionPane2"> <Header> <span onmouseover="Openpane('2',event)">On MouseOver</span> </Header> <Content> <br /> <br /> Expand Accordion Panes on Mouse Over :: Pane 3 <br /> <br /> </Content> </cc1:AccordionPane> </Panes> </cc1:Accordion> </form> </body> </html> IN THE SAME APP this page does not work: <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!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"> <asp:ScriptManager ID="Scriptmanager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager> <script language="javascript" type="text/javascript"> function Openpane(paneIndex,eventElement) { var behavior = $get("Accordion1").AccordionBehavior; behavior.set_SelectedIndex(paneIndex); } </script> <div> <cc1:Accordion ID="Accordion1" runat="server" ContentCssClass="dimgreen" FadeTransitions="false" FramesPerSecond="25" TransitionDuration="250" HeaderCssClass="grey" EnableViewState="false" SelectedIndex="-1" SuppressHeaderPostbacks="true"> <Panes> <cc1:AccordionPane runat="server" ID="PaneOne"> <Header> <span onmouseover="Openpane('0',event)">Accordion</span> </Header> <Content> <br /> <br /> Expand Accordion Panes on Mouse Over :: Pane 1 <br /> <br /> </Content> </cc1:AccordionPane> <cc1:AccordionPane runat="server" ID="AccordionPane1"> <Header> <span onmouseover="Openpane('1',event)">Open Panes</span> </Header> <Content> <br /> <br /> Expand Accordion Panes on Mouse Over :: Pane 2 <br /> <br /> </Content> </cc1:AccordionPane> <cc1:AccordionPane runat="server" ID="AccordionPane2"> <Header> <span onmouseover="Openpane('2',event)">On MouseOver</span> </Header> <Content> <br /> <br /> Expand Accordion Panes on Mouse Over :: Pane 3 <br /> <br /> </Content> </cc1:AccordionPane> </Panes> </cc1:Accordion> <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> </asp:contentplaceholder> </div> </form> </body> </html> i AM NOT SURE WHAT NEEDS TO CHANGED???? "Nate" wrote: > Hi All - My Accordion control works fine until I move it into a master page; > > Does anybody have an example of an Accordion control working entirely in the > masterpage.master file? > > > When I check the client src generated i find: > > // this works on Default.aspx > //<![CDATA[ > Sys.WebForms.PageRequestManager._initialize('Scriptmanager1', > document.getElementById('form1')); > Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); > //]]> > > // this page does not function > //<![CDATA[ > Sys.WebForms.PageRequestManager._initialize('ctl00$Scriptmanager1', > document.getElementById('aspnetForm')); > Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); > //]]> > >
From: bruce barker on 13 Sep 2007 00:31 try: var behavior = $get("<%=Accordion1.ClientId%>").AccordionBehavior; -- bruce (sqlwork.com) Nate wrote: > I am still testing... > > this page works: > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default6.aspx.cs" > Inherits="Default6" %> > <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" > TagPrefix="cc1" %> > > <!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"> > <asp:ScriptManager ID="Scriptmanager1" runat="server" > EnablePartialRendering="true"></asp:ScriptManager> > <script language="javascript" type="text/javascript"> > function Openpane(paneIndex,eventElement) { > var behavior = $get("Accordion1").AccordionBehavior; > behavior.set_SelectedIndex(paneIndex); > } > </script> > <cc1:Accordion ID="Accordion1" runat="server" ContentCssClass="dimgreen" > FadeTransitions="false" FramesPerSecond="25" > TransitionDuration="250" HeaderCssClass="grey" > EnableViewState="false" SelectedIndex="-1" > SuppressHeaderPostbacks="true"> > <Panes> > <cc1:AccordionPane runat="server" ID="PaneOne"> > <Header> > <span > onmouseover="Openpane('0',event)">Accordion</span> > </Header> > <Content> > <br /> > <br /> > Expand Accordion Panes on Mouse Over :: Pane 1 > <br /> > <br /> > </Content> > </cc1:AccordionPane> > <cc1:AccordionPane runat="server" ID="AccordionPane1"> > <Header> > <span onmouseover="Openpane('1',event)">Open > Panes</span> > </Header> > <Content> > <br /> > <br /> > Expand Accordion Panes on Mouse Over :: Pane 2 > <br /> > <br /> > </Content> > </cc1:AccordionPane> > <cc1:AccordionPane runat="server" ID="AccordionPane2"> > <Header> > <span onmouseover="Openpane('2',event)">On > MouseOver</span> > </Header> > <Content> > <br /> > <br /> > Expand Accordion Panes on Mouse Over :: Pane 3 > <br /> > <br /> > </Content> > </cc1:AccordionPane> > </Panes> > </cc1:Accordion> > </form> > </body> > </html> > > IN THE SAME APP this page does not work: > > <%@ Master Language="C#" AutoEventWireup="true" > CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> > <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" > TagPrefix="cc1" %> > <!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"> > <asp:ScriptManager ID="Scriptmanager1" runat="server" > EnablePartialRendering="true"></asp:ScriptManager> > <script language="javascript" type="text/javascript"> > function Openpane(paneIndex,eventElement) { > var behavior = $get("Accordion1").AccordionBehavior; > behavior.set_SelectedIndex(paneIndex); > } > </script> > <div> > <cc1:Accordion ID="Accordion1" runat="server" ContentCssClass="dimgreen" > FadeTransitions="false" FramesPerSecond="25" > TransitionDuration="250" HeaderCssClass="grey" > EnableViewState="false" SelectedIndex="-1" > SuppressHeaderPostbacks="true"> > <Panes> > <cc1:AccordionPane runat="server" ID="PaneOne"> > <Header> > <span > onmouseover="Openpane('0',event)">Accordion</span> > </Header> > <Content> > <br /> > <br /> > Expand Accordion Panes on Mouse Over :: Pane 1 > <br /> > <br /> > </Content> > </cc1:AccordionPane> > <cc1:AccordionPane runat="server" ID="AccordionPane1"> > <Header> > <span onmouseover="Openpane('1',event)">Open > Panes</span> > </Header> > <Content> > <br /> > <br /> > Expand Accordion Panes on Mouse Over :: Pane 2 > <br /> > <br /> > </Content> > </cc1:AccordionPane> > <cc1:AccordionPane runat="server" ID="AccordionPane2"> > <Header> > <span onmouseover="Openpane('2',event)">On > MouseOver</span> > </Header> > <Content> > <br /> > <br /> > Expand Accordion Panes on Mouse Over :: Pane 3 > <br /> > <br /> > </Content> > </cc1:AccordionPane> > </Panes> > </cc1:Accordion> > > <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> > </asp:contentplaceholder> > </div> > </form> > </body> > </html> > > i AM NOT SURE WHAT NEEDS TO CHANGED???? > > "Nate" wrote: > >> Hi All - My Accordion control works fine until I move it into a master page; >> >> Does anybody have an example of an Accordion control working entirely in the >> masterpage.master file? >> >> >> When I check the client src generated i find: >> >> // this works on Default.aspx >> //<![CDATA[ >> Sys.WebForms.PageRequestManager._initialize('Scriptmanager1', >> document.getElementById('form1')); >> Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); >> //]]> >> >> // this page does not function >> //<![CDATA[ >> Sys.WebForms.PageRequestManager._initialize('ctl00$Scriptmanager1', >> document.getElementById('aspnetForm')); >> Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); >> //]]> >> >>
From: Nate on 13 Sep 2007 10:36
Thanks Bruce, I get comile error: error CS0117: 'AjaxControlToolkit.Accordion' does not contain a definition for 'ClientId' any ideas? - Nate "bruce barker" wrote: > try: > > var behavior = $get("<%=Accordion1.ClientId%>").AccordionBehavior; > > -- bruce (sqlwork.com) > > Nate wrote: > > I am still testing... > > > > this page works: > > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default6.aspx.cs" > > Inherits="Default6" %> > > <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" > > TagPrefix="cc1" %> > > > > <!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"> > > <asp:ScriptManager ID="Scriptmanager1" runat="server" > > EnablePartialRendering="true"></asp:ScriptManager> > > <script language="javascript" type="text/javascript"> > > function Openpane(paneIndex,eventElement) { > > var behavior = $get("Accordion1").AccordionBehavior; > > behavior.set_SelectedIndex(paneIndex); > > } > > </script> > > <cc1:Accordion ID="Accordion1" runat="server" ContentCssClass="dimgreen" > > FadeTransitions="false" FramesPerSecond="25" > > TransitionDuration="250" HeaderCssClass="grey" > > EnableViewState="false" SelectedIndex="-1" > > SuppressHeaderPostbacks="true"> > > <Panes> > > <cc1:AccordionPane runat="server" ID="PaneOne"> > > <Header> > > <span > > onmouseover="Openpane('0',event)">Accordion</span> > > </Header> > > <Content> > > <br /> > > <br /> > > Expand Accordion Panes on Mouse Over :: Pane 1 > > <br /> > > <br /> > > </Content> > > </cc1:AccordionPane> > > <cc1:AccordionPane runat="server" ID="AccordionPane1"> > > <Header> > > <span onmouseover="Openpane('1',event)">Open > > Panes</span> > > </Header> > > <Content> > > <br /> > > <br /> > > Expand Accordion Panes on Mouse Over :: Pane 2 > > <br /> > > <br /> > > </Content> > > </cc1:AccordionPane> > > <cc1:AccordionPane runat="server" ID="AccordionPane2"> > > <Header> > > <span onmouseover="Openpane('2',event)">On > > MouseOver</span> > > </Header> > > <Content> > > <br /> > > <br /> > > Expand Accordion Panes on Mouse Over :: Pane 3 > > <br /> > > <br /> > > </Content> > > </cc1:AccordionPane> > > </Panes> > > </cc1:Accordion> > > </form> > > </body> > > </html> > > > > IN THE SAME APP this page does not work: > > > > <%@ Master Language="C#" AutoEventWireup="true" > > CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> > > <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" > > TagPrefix="cc1" %> > > <!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"> > > <asp:ScriptManager ID="Scriptmanager1" runat="server" > > EnablePartialRendering="true"></asp:ScriptManager> > > <script language="javascript" type="text/javascript"> > > function Openpane(paneIndex,eventElement) { > > var behavior = $get("Accordion1").AccordionBehavior; > > behavior.set_SelectedIndex(paneIndex); > > } > > </script> > > <div> > > <cc1:Accordion ID="Accordion1" runat="server" ContentCssClass="dimgreen" > > FadeTransitions="false" FramesPerSecond="25" > > TransitionDuration="250" HeaderCssClass="grey" > > EnableViewState="false" SelectedIndex="-1" > > SuppressHeaderPostbacks="true"> > > <Panes> > > <cc1:AccordionPane runat="server" ID="PaneOne"> > > <Header> > > <span > > onmouseover="Openpane('0',event)">Accordion</span> > > </Header> > > <Content> > > <br /> > > <br /> > > Expand Accordion Panes on Mouse Over :: Pane 1 > > <br /> > > <br /> > > </Content> > > </cc1:AccordionPane> > > <cc1:AccordionPane runat="server" ID="AccordionPane1"> > > <Header> > > <span onmouseover="Openpane('1',event)">Open > > Panes</span> > > </Header> > > <Content> > > <br /> > > <br /> > > Expand Accordion Panes on Mouse Over :: Pane 2 > > <br /> > > <br /> > > </Content> > > </cc1:AccordionPane> > > <cc1:AccordionPane runat="server" ID="AccordionPane2"> > > <Header> > > <span onmouseover="Openpane('2',event)">On > > MouseOver</span> > > </Header> > > <Content> > > <br /> > > <br /> > > Expand Accordion Panes on Mouse Over :: Pane 3 > > <br /> > > <br /> > > </Content> > > </cc1:AccordionPane> > > </Panes> > > </cc1:Accordion> > > > > <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> > > </asp:contentplaceholder> > > </div> > > </form> > > </body> > > </html> > > > > i AM NOT SURE WHAT NEEDS TO CHANGED???? > > > > "Nate" wrote: > > > >> Hi All - My Accordion control works fine until I move it into a master page; > >> > >> Does anybody have an example of an Accordion control working entirely in the > >> masterpage.master file? > >> > >> > >> When I check the client src generated i find: > >> > >> // this works on Default.aspx > >> //<![CDATA[ > >> Sys.WebForms.PageRequestManager._initialize('Scriptmanager1', > >> document.getElementById('form1')); > >> Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); > >> //]]> > >> > >> // this page does not function > >> //<![CDATA[ > >> Sys.WebForms.PageRequestManager._initialize('ctl00$Scriptmanager1', > >> document.getElementById('aspnetForm')); > >> Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); > >> //]]> > >> > >> > |