While examining the demo project for xVal, a validation framework designed for ASP.NET MVC, I observed that the Masterpage javascript references were enclosed in a PlaceHolder control:
<asp:PlaceHolder runat="server">
<script type="text/javascript" src="<%= Url.Content("~/scripts/jquery-1.3.2.min.js") %>"></script>
<script type="text/javascript" src="<%= Url.Content("~/scripts/jquery.validate.js") %>"></script>
<script type="text/javascript" src="<%= Url.Content("~/scripts/xVal.jquery.validate.js") %>"></script>
</asp:PlaceHolder>
I fail to see the advantage of using the PlaceHolder control instead of directly referencing the files like this:
<script type="text/javascript" src="/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.validate.js"></script>
<script type="text/javascript" src="/scripts/xVal.jquery.validate.js"></script>
Is there something I am overlooking here?