Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use jQuery in a page with master page?
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01585983
Message ID:
01585987
Views:
43
>I am working in VS2012 on ASP.NET Web Forms project. The project has Site.Master page which is used for all pages. I can add script to the Site.Master where I can write jQuery function; no problem. But how and where do you place the script code to use jQuery if I want it in a certain page of the project? The page (because it uses Site.Master) does not have Head section but has only one section:
>
>
><asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
>
>
>If I write script before the above line I get VS problem "Only Content controls are allowed directly in contect page ..."
>
>What am I missing?
>
>TIA

There is a ContentPlaceHolder in HEAD section in Site.Master.
Put links there.
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform