tags:

views:

45

answers:

1

I am new to asp .net. I am trying to use the JQuery library scripts. So included them in my aspx page as follows

<script src="<%= Page.ResolveClientUrl("~/jquery-1.3.2.js")%>" type="text/javascript"></script>

<script src="<%= Page.ResolveClientUrl("~/jquery.validate.js")%>" type="text/javascript"></script>

<script src="<%= Page.ResolveClientUrl("~/jquery.form.js")%>" type="text/javascript"></script>

I just wrote the sample code to test the alert message.

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        alert('hi');
    });
</script>

I did not get any error when the page loaded but the alert message is not displayed. I hope I have got all the files necessary for using jquery. But I dont know why the alert message does not display. Any thoughts or comments?

+1  A: 

You need to do the following then for each file:

<script src='<%= Page.ResolveClientUrl("~/scripts/jquery/a-jquery-file.js")%>' 
   type='text/javascript'></script>

~/ indicates the root of the folder, so you need the additional folder structure.

GenericTypeTea