View Single Post
  #8 (permalink)  
Old June 16th, 2010, 03:17 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
I placed the script code in the default.aspx with <head>..</head> enclosed.
That's not allowed when the page is based on a master page. You can choose among at least three solution:

1. Don't use a Master Page

2. Move the script to the <head> section of the Master Page (so it's available in all pages that use that master page)

3. Create a ContentPlaceHolder in the head of the master and add the scripts to the Content block for that ContentPlaceHolder in your content page.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!