0
시나리오 Webform 프로젝트에서 작업 중입니다. 업데이트 패널 안에 드롭 다운과 gridview를 넣은 웹 페이지를 만들었습니다. 드롭 다운 이벤트 OnSelectedIndexChanged
가 gridview 데이터 소스 바인딩을 상승 시켰지만 동시에 크롬 콘솔 창에서 오류가 발생했습니다. 다음은오류 받기 : 형식 Sys.WebForms.Menu가 이미 등록되었습니다.
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="panel-body">
<div class="row">
<div class="col-md-4">
<div class="input-group ah-equal-textbox-size">
<span class="input-group-addon">Select Role</span>
<asp:DropDownList
ID="ddlSelectRole"
runat="server"
CssClass="form-control chosen-select"
AutoPostBack="true"
OnSelectedIndexChanged="ddlSelectRole_SelectedIndexChanged"
>
<asp:ListItem Selected="True" Value="0">Select Role</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4 ah-top-bottom-margin9px">
</div>
</div>
<hr />
<asp:GridView
ID="gvRoleRights"
runat="server"
ShowHeaderWhenEmpty="true"
AutoGenerateColumns="false"
EmptyDataText="No Data Found!"
ShowFooter="False"
BorderStyle="None"
CellPadding="3"
GridLines="Horizontal"
SkinID="AHGridView">
<Columns>
<asp:BoundField DataField="Role_ID" HeaderText="Role ID" />
<asp:BoundField DataField="Form_Name" HeaderText="Form Name" />
<asp:BoundField DataField="Can_View" HeaderText="Can View" />
<asp:BoundField DataField="Can_Edit" HeaderText="Can Edit" />
<asp:BoundField DataField="Can_Prepare_By" HeaderText="Can Prepare" />
<asp:BoundField DataField="Can_Change_Status_By" HeaderText="Active" />
<asp:BoundField DataField="Prepared_By_ID" HeaderText="Prepared By ID" />
<asp:BoundField DataField="Prepared_Date" HeaderText="Prepared By Date" />
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
내 마스터 페이지에 ScriptManager 코드 :
<asp:ContentPlaceHolder ID="ScriptContentPlaceHolder" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" CombineScripts="true">
<Scripts>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
</asp:ContentPlaceHolder>
내가하는 방법에 대한 참조를 찾을 수 많이 있지만 검색 한
다음은 내 영문 코드 아래의 오류를 해결하십시오. 인터넷에서 검색 한 참고 링크도 첨부했습니다. 너희들은 아래의 오류를 해결하는 방법을 알고 있다면 알려주지. 한 번에 하나씩 제거 시도하고 있는지
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
:
또는 역순으로 스크립트를 추가하지 않고 시작하고 오류가 트리거 될 때까지 하나씩 추가하십시오. ToolkitScriptManager가 자동으로로드하기 때문에 많은 것을 필요로하지 않을 수도 있습니다. – wazz
내가 한 번 한 것은'ToolkitScriptManager'가 아니라'ScriptManager'에 사용되고, 그런 식의 개별 스크립트가로드 된 것 같습니다. ToolkitScriptManager 로딩 스크립트와 동일한 스크립트 로딩 사이의 충돌을 피하는 것이 좋습니다. – wazz
'MenuStandards.js' 행에 주석을 달고 오류가 사라졌습니다. 빠른 응답에 감사합니다. –