Last post Jan 21, 2019 06:38 AM by Wei Zhang
Jan 18, 2019 01:39 PM|RobertH3|LINK
I have tried to use a bootstrap dropdown menu feature on a webpage, but is not workings. Says it requires popper.js
I already have the feature on the Masterpage and it works just fine, but on a content page will not work
I used nuget to download the file, says it already exists
Why would it work on the masterpage part of the page, but not on the content part of the page and give the error?
1. yes I have scriptmanager - remember it works on the masterpage!
Jan 18, 2019 01:51 PM|l.laxmikant|LINK
does js file located in your application or cdn? Path may not be accessible from content page physical location.
Try adding js file like.
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Panel ID="panelContent" GroupingText="ContentPage Controls" runat="server">
// other control
or add code on content page load
Page.ClientScript.RegisterClientScriptInclude("selective", ResolveUrl(@"js url"));
Jan 19, 2019 12:54 AM|RobertH3|LINK
It also works opposite, If i add it to content page, the masterpage doesn't work? strange
Jan 19, 2019 01:09 AM|jzero|LINK
Could you provide some code of your master page and page?
Jan 19, 2019 03:09 AM|KathyW|LINK
"It also works opposite, If i add it to content page, the masterpage doesn't work? strange"
Jan 19, 2019 10:34 PM|nsuchy|LINK
It should not matter if you use a feature in your Layout file, or the actual page as it's all transformed into a single page of html before being sent to the user. Are you sure you're using the feature correctly? You mentioned it asks for popper.js, did
you modify the default CDN links that Visual Studio setup for you?
Jan 21, 2019 06:38 AM|Wei Zhang|LINK
According to your description,I suggest you to check the status of page by F12 in browser. If it shows 404 error to find the script, it means the script path in your page is not right.
Is your project and js folder both in separate folder? if so, you should add '../' which means find the root of file before your reference to your js file ,such as below.