Delegate Control with jQuery Not Working

Mar 3, 2009 at 7:18 AM
I have created a UserControl
<%@ Control Language="C#" ClassName="jQueryUC" %>
<script type="text/javascript" src="~/_layouts/jquery-1.2.6.js"></
script>

i created a Feature.xml and elements.xml
in elements.xml i used the "AdditionalPageHead" as controlId and Sequence=90 and path of controlsrc.

i install and activate this feature


<SharePoint:DelegateControl ID="DelegateControl1" runat="server" ControlId="AdditionalPageHead"
AllowMultipleControls="true" />
i wrote this tag in Head Tag of my masterPage (Note: this is not default.master , it my custom masterpage)

now i added an Test.aspx page
in this page i have all ContentPlaceholders that we needed
<asp:Content ID="Content11" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script type="text/javascript">
$(function() {
$('#anc').click(function() {
alert("Hello World");
});
});
</script>
<a href="#" id="anc">Request</a>

</asp:Content>


i run my Test.aspx page, it got my custom masterpage, i check the viewsource of Test.aspx , in head Tag i found this (<script type="text/javascript" src="~/_layouts/jquery-1.2.6.js"></script>)
but my jQuery doesn't work.
i am just showing simple alert.

where i am doing wrong.

any Ideas?
Kind Regards,
Saurabh
Mar 3, 2009 at 9:15 AM
it works....

i have used the wrong path ....

thanx