Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use jQuery in a page with master page?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01585983
Message ID:
01585987
Vues:
42
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform