Click here to Skip to main content
11,637,662 members (91,343 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: jQuery
Master page content

<html xmlns="">
<head runat="server">
    <title>Untitled Page</title>
    <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
    <link href="styles/Header.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder id="head" runat="server">

    <form id="form1" runat="server">
   <div id ="header">
          <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/NkBhat.JPG" />
        <asp:LinkButton ID="LinkButton1" class="contact" runat="server">Contact Us</asp:LinkButton>
        <asp:LinkButton ID="LinkButton2" class="careers" runat="server">Careers</asp:LinkButton>
     <div id ="menu">
              <li><a href="#">Home</a></li>
              <li><a href="#">About Us</a></li>
              <li><a href = "#">Services</a></li>
              <li><a href="#">Industries</a></li>
              <li><a href="#">Solutions</a></li>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

Child page

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="pages_Home" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script src="js/JScript.js" type="text/javascript"></script>
<asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder1">

Posted 20-Nov-12 21:32pm
Edited 20-Nov-12 21:56pm
Sk. Tajbir at 21-Nov-12 3:41am
Can you specify more about child page which is inheriting this master page ? also please don't include jquery library in the child page.
sathish k.kumar at 21-Nov-12 3:53am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Add JS file programaticaly and try

Dim ObjLocJsForJquery = New HtmlGenericControl()
          ObjLocJsForJquery.TagName = "script"
          ObjLocJsForJquery.Attributes.Add("type", "text/javascript")
          ObjLocJsForJquery.Attributes.Add("language", "javascript")
          ObjLocJsForJquery.Attributes.Add("src", Page.ResolveClientUrl("~/Js/jquery-1.8.2.min.js"))
And Check.
sathish k.kumar at 21-Nov-12 3:40am
inside the script tag or... just declare it above the header content tag...
Marla Sukesh at 21-Nov-12 4:17am
write in Page load

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 380
1 Sergey Alexandrovich Kryukov 309
2 stibee 308
3 OriginalGriff 230
4 sasanka sekhar panda 190
0 OriginalGriff 9,031
1 Sergey Alexandrovich Kryukov 8,763
2 Mika Wendelius 6,999
3 F-ES Sitecore 2,388
4 Suvendu Shekhar Giri 2,320

Advertise | Privacy | Mobile
Web02 | 2.8.150728.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100