How to: Insert javascript in Content Pages

by xiquinho 6/3/2008 12:13:00 PM

In your Master page you would have something like this:

<head runat="server">
...
<asp:ContentPlaceHolder ID="htmlHead" runat="server" />
...
</head>

Then in your content page you would have something like this:

<asp:Content ID="Content1" ContentPlaceHolderID="htmlHead" runat="server">
    <script type="text/javascript" src="js/custom.js"></script>
</asp:Content>

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

ASP.NET

Xiquinho Suggestions


Beginning ASP.NET 3.5: In...

Imar Spaanjaars
New: $29.69

Pro ASP.NET 3.5 in C# 200...

Matthew MacDonald
New: $37.79

Professional ASP.NET 3.5:...

Bill Evjen
New: $34.64

ASP.NET 3.5 Unleashed

Stephen Walther
New: $37.79

Beginning ASP.NET 3.5 in ...

Matthew MacDonald
New: $31.49

ASP.NET 2.0 Website Progr...

Marco Bellinaso
New: $26.39

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

1/7/2009 6:26:40 AM

About Xiquinho

Xiquinho da Silva Xiquinho da Silva lives in Cacau and builds relational databases management systems.
In his free time he enjoys to walk with dogs and debunk religions.

E-mail me Send mail

Book Hostels Online Now

Calendar

<<  January 2009  >>
MoTuWeThFrSaSu
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar

Quote Of The Day

Lighthouses are more helpful then churches.

- Benjamin Franklin

Expedia.com

Great Music