Solved

On master file in asp.net where do i put the link and client side script?? please help - thanks

Posted on 2011-03-14
3
378 Views
Last Modified: 2012-06-21
Where do you add the following, link and sript
   
    <link href="../jquery/Calendar.css" rel="stylesheet" type="text/css" />  

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#datepicker").datepicker();
        });


following is my master file, kindly show where would the the above code go?  I have tried to put it at different places but gives me an error.
please help,

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="deleteme1.aspx.cs" Inherits="AceSA_12_12_2009.Examples.deleteme1" %>
   
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">



</asp:Content>
0
Comment
Question by:goodk
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
gamarrojgq earned 500 total points
ID: 35134999
Hi,

The code and link will be inside the HEAD tag, but the markup that you post is not your master file, but a child page that USE a masterpage. This "~/MasterPage.master"   will be your masterpage and there is where you have to put the script and link, It will be something like this

<Head>

<link href="../jquery/Calendar.css" rel="stylesheet" type="text/css" />  

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#datepicker").datepicker();
        });

</Head>

0
 

Author Closing Comment

by:goodk
ID: 35138052
the answer I was looking for is how to do it on the child page?
0
 
LVL 13

Expert Comment

by:gamarrojgq
ID: 35139359
Ok, to do it in the childPage just put the code inside the CONTENT tag like this

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<link href="../jquery/Calendar.css" rel="stylesheet" type="text/css" />  

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#datepicker").datepicker();
        });

</asp:Content>
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question