I'm in a fix with JQuery and ASP.Net!
This is my script code. I have used autocomplete to list names of courses from a database. I have a web form named Courses.aspx which has a master page.
<link rel="stylesheet" href="css/jquery-ui.css" />
<script src="js/jquery-1.8.3.js" type="text/javascript" language="javascript"></script>
<script src="js/jquery-ui.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
function LoadList() {
var ds = null;
ds = <%=listFilter %>
$("#txtName3").autocomplete({
source: ds
});
}
</script>
Now the problem:
If I don't add the master page, the autocomplete works like a charm.
But it doesn't work with a master page.
The main reason (I think) is that I'm unable to to load the function LoadList() on the body tag. So I used other methods like window.onload=function
$(document).read(function)
and I even made a user control so I can easily add the body tag which i can't generally in a master page.
Please help me find a solution.