Ajax/Sharepoint Webpart - UI undefined/null and Only one instance per page
In a VM, I am using Sharepoint 2013, Visual Studio 2012, and the AjaxControlToolkit (I use the Tabcontainer.  My application page has <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ></asp:ToolkitScriptManager> and my Sharepoint v4.master, oslo.master, seattle.master have <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />.

Because of this, I get the error message "Only one instance of a script manager can be added to a page."  I have tried commenting out the v4.master ScriptManager, replacing it with the AjaxControlToolkit, and every other suggestion I have seen to solve this problem.

Also by commenting toolscriptmanager line in the content page, i get the error "Unable to get value of the property UI: object is null or undefined" which obviously mean it expect a script manager to run/converse the ajax controls.

The one thing I am left with is to use a ScriptManagerProxy.  So added <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"> </asp:ScriptManagerProxy> to my Application page but still got the "only one script manager can be added..." error.  Obviously I have to do something within the ScriptManagerProxy to make it work but I can't figure out what it's supposed to do and how to make it do that.  

     <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
            <asp:Panel ID="PersInfoPanel" runat="server" GroupingText="Person information" Width="923px">
                <table id="PersonContentTbl" style="width: 100%;">
                    <tr>
                        <td class="auto-style2">
                            <asp:Label ID="Label1" runat="server" Text="Kundnr: "> </asp:Label>
                            <br />
                            <asp:Label ID="Label2" runat="server" Text="Namn: "> </asp:Label>
                        </td>
                        <td class="auto-style5">&nbsp;</td>
                        <td>
                            <asp:Label ID="Label3" runat="server" Text="Grundar sig p: "> </asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style2"></td>
                        <td class="auto-style5">&nbsp;</td>
                        <td>
                            <asp:Button ID="GetCustBtn" runat="server" Text="Hmta Kund" />
                        </td>
                    </tr>
                </table>
                </asp:Panel>
         
       <asp:TabContainer ID="TabContainer" runat="server" ActiveTabIndex="0" Height="136px" Width="921px">
                            <asp:TabPanel ID="SummaryPanel" runat="server" HeaderText="TabPanel5">
                                <HeaderTemplate>
                                    Sammanfattning
                                </HeaderTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="SparPanel" runat="server" HeaderText="TabPanel2">
                                <HeaderTemplate>
                                    Spara
                                </HeaderTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="LanPanel" runat="server" HeaderText="TabPanel3">
                                <HeaderTemplate>
                                    Lna
                                </HeaderTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel ID="SvcesPanel" runat="server" HeaderText="TabPanel4">
                                <HeaderTemplate>
                                    Tjnster
                                </HeaderTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
                                <HeaderTemplate>
                                    CheckLista
                                </HeaderTemplate>
                            </asp:TabPanel>
                        </asp:TabContainer>
           <asp:ModalPopupExtender ID="mdlpopExt" runat="server"
             PopupControlID="CustomInfoPanel" TargetControlID="GetCustBtn"
              BackgroundCssClass="modalBackground"  CancelControlID="CancelBtn">
            </asp:ModalPopupExtender>
            <asp:Panel ID="CustomInfoPanel" runat="server" GroupingText="Hmta kund" Width="511px" CssClass="modalPopup">
                <table style="width: 101%;">
                    <tr>
                        <td colspan="2"><asp:TextBox ID="PersNrTxt" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td colspan="2"><asp:GridView ID="PersonsGrid" runat="server" AutoGenerateColumns="False"></asp:GridView></td>
                    </tr>
                    <tr>
                        <td class="auto-style3">&nbsp;</td>
                        <td><asp:Button ID="CancelBtn" runat="server" text="Stng" /></td>
                        <td><asp:Button ID="AcceptBtn" runat="server" text="Vlj" /></td>
                    </tr>
                </table>
            </asp:Panel>
            </form>
    </body>

I'm hoping that someone can help me! Because this is my first project in the company i work at and dont wanna disappoint anyone.   Thanks in advance.
October 26th, 2013 5:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics