Javascript 底部MS pnp分类控件呈现

Javascript 底部MS pnp分类控件呈现,javascript,c#,jquery,.net,sharepoint,Javascript,C#,Jquery,.net,Sharepoint,我试图在我的简单页面上使用分类法控件。但是,它始终呈现在页面底部。隐藏字段保留在原来的位置,但分类法控件始终位于底部 在呈现的页面上,我始终将Test和blubb放在一起,分类法控件紧随其后: 测验 布卢布 [对照] 有没有已知的bug导致这种情况发生 <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Import Namespace="Microsoft.SharePoint.Applic

我试图在我的简单页面上使用分类法控件。但是,它始终呈现在页面底部。隐藏字段保留在原来的位置,但分类法控件始终位于底部

在呈现的页面上,我始终将Test和blubb放在一起,分类法控件紧随其后: 测验 布卢布 [对照]

有没有已知的bug导致这种情况发生

    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="t.aspx.cs" Inherits="sptaxpicker2.Layouts.sptaxpicker2.t" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <link rel="stylesheet" type="text/css" href="style/taxonomypickercontrol.css">
    <script src="scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="scripts/taxonomypickercontrol.js" type="text/javascript"></script>

    <script>
        //Wait for the page to load
        $(document).ready(function () {

            //Get the URI decoded SharePoint site url from the SPHostUrl parameter.
            var spHostUrl = "http://sp2013";
            var appWebUrl = "http://sp2013/sites/dev";
            var spLanguage = "en-us";

            //Build absolute path to the layouts root with the spHostUrl
            var layoutsRoot = spHostUrl + '/_layouts/15/';

            //load all appropriate scripts for the page to function
            $.getScript(layoutsRoot + 'SP.Runtime.js',
                function () {
                    $.getScript(layoutsRoot + 'SP.js',
                        function () {
                            //Load the SP.UI.Controls.js file to render the Add-In Chrome
                            //$.getScript(layoutsRoot + 'SP.UI.Controls.js', renderSPChrome);

                            //load scripts for cross-domain calls
                            //$.getScript(layoutsRoot + 'SP.RequestExecutor.js', function () {
                            //    context = new SP.ClientContext(appWebUrl);
                            //    var factory = new SP.ProxyWebRequestExecutorFactory(appWebUrl);
                            //    context.set_webRequestExecutorFactory(factory);
                            //});

                            context = new SP.ClientContext(appWebUrl);

                            //load scripts for calling taxonomy APIs
                            $.getScript(layoutsRoot + 'init.js',
                                function () {
                                    $.getScript(layoutsRoot + 'sp.taxonomy.js',
                                        function () {
                                            $('#txbox').taxpicker({
                                                isMulti: false,
                                                allowFillIn: false,
                                                termSetId: 'bed6c3ef-4eac-4bfb-9809-94112e7ba0c2'
                                            }, context);
                                        });
                                });
                        });
                });
        });
    </script>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
   test<br /> <input type="hidden" id="txbox" /><br />blubb

</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
simple test
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
simpletest
</asp:Content>
谢谢! 最好的
Christian

找到了解决方案:重要的是将控件放在像div这样的容器中,而不是直接作为表数据,因为后面的javascript使用父元素来移动项