Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Master Page

ASP.NET
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  
<head runat="server">
    <title>Untitled Page</title>
    <link href="styles/Header.css" rel="stylesheet" type="text/css" />
    
    <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
    
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>  
    
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js" type="text/javascript"></script>

    <script src="js/JScript.js" type="text/javascript"></script>
    <asp:ContentPlaceHolder id="head" runat="server">            
    
    
    
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
   <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 ID="LinkButton2" class="careers" runat="server">Careers
     </div>
     <div id="menu">         
         <ul>
              <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>
         </ul>
          
     </div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
         
        
    </div>
    </form>
</body>
</html>



Normal aspx page

ASP.NET
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <link href="styles/Header.css" rel="stylesheet" type="text/css" />    
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>  
    
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js" type="text/javascript"></script>

    <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
    

    <script src="js/JScript.js" type="text/javascript"></script>
</head>
<body>
     <form id="form1" runat="server">
     <div id="header">    
         
         <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/NkBhat.JPG"/>
         <asp:LinkButton class="contact" runat="server">Contact Us  
         <asp:LinkButton class="careers" runat="server">Carrers        
     </div>
     <div id="menu">         
         <ul>
              <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>
         </ul>
          
     </div>
     </form>
</body>
</html>



Pls give me answer
Posted
Updated 20-Nov-12 21:16pm
v2
Comments
n.podbielski 21-Nov-12 3:17am    
You should really format your question. Second, what do you mean by not working?
sathish k.kumar 21-Nov-12 3:22am    
jquery is not firing on master page content ...
But its working properly on normal .aspx pages... i dont really how to call the jquery in master page... that is the problem.... pls guide me...
n.podbielski 23-Nov-12 2:05am    
If this work with CDN and not with file from disk I would say that your path to file is incorrect.

Hi,
You've included jQuery library twice in both the pages. Please include it once. You can include it from your local drive or from google's website.

For more information check Here[^]

:)
 
Share this answer
 
Comments
n.podbielski 21-Nov-12 3:39am    
Since 'normal page' is not using master page I don't see connection, why not use 1 version on 1 page and second on another. Also I don't see any information about it in your link.
Are you answering your own questions or what?
Sk. Tajbir 21-Nov-12 3:52am    
No I'm not answering my own question. I just identified a problem and given a link of common jQuery problem. I think I should include this in the comment section. But since I've started answering question in this community I got confused putting my answer in comment section or the solution section. Thanks for notifying this. I should have added this to the comment section. :)
n.podbielski 23-Nov-12 2:03am    
You answered question not entirely about problem, and it was accepted anyway. This is bit suspicious. But whatever.
Sk. Tajbir 23-Nov-12 6:53am    
But in the example jQuery library is included twice and I told to use it once. Also I've given a link of common jQuery problems. Thats it. Anyway thanks for your notification. I think I should have answerd it in the comment section. :)
n.podbielski 24-Nov-12 3:09am    
ok. no worries.
Some Time The Control Id, is Changed With Master Page,
So When We use That control in java script, Then It is Urgent To change Control Id in java script File

Plz See The Example:
http://www.asp.net/web-forms/tutorials/master-pages/control-id-naming-in-content-pages-cs
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900