Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 25th, 2012, 02:04 PM
Friend of Wrox
 
Join Date: Mar 2011
Posts: 126
Thanks: 39
Thanked 2 Times in 2 Posts
Default Chapter 11 -p.397

Hi Imar,

I had a question on how to add a reference to the script files from your pages.

On p. 369, your able to add a reference using <asp:ScriptReference Path="~/scripts/jquery-1.4.1.min.js"

I tried to do following for pluging...
<script src="~/scripts/jquery.updnWatermark.js" ...... ></script>

I get an error when I do this. Why can't I use the "~" in the path?

Thanks.
Tulsi
 
Old April 26th, 2012, 02:37 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The ~ syntax works for server side controls, and the ASP.NET runtime converts it to a path that works at the cliient. A <script> element is a client side element, and as such doesn't support the ~ syntax.

Cheers,

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!
The Following User Says Thank You to Imar For This Useful Post:
Tulsi (April 26th, 2012)





Similar Threads
Thread Thread Starter Forum Replies Last Post
jQuery Watermark Plugin (p 397) jlransford BOOK: Beginning ASP.NET 4 : in C# and VB 2 December 22nd, 2011 04:05 PM
Chapter 11 Help please Soccerguy BOOK: Beginning ASP.NET 4 : in C# and VB 2 June 10th, 2011 06:04 AM
chapter 11 cinek BOOK: Beginning iOS 4 Application Development 4 April 30th, 2011 05:13 PM
Chapter-11 Carlw BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 October 16th, 2008 02:08 PM
chapter 11 figure 11-7 relative positioning pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 November 29th, 2007 06:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.