try:
<script src="Scripts/jquery-1.4.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#Button1").click(function() {
$.ajax({
type: "POST",
url: "/ASPNET_WebServices_JQuery/DateWebService.asmx/GetDateTime",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg)
{
$("#output").text(msg.d);
}
});
});
});
In the above
url: A string containing the URL to which the request is sent.I put the website project name followed by the service file name with extension and then the web method name.
for more refer:
http://www.ezzylearning.com/tutorial.aspx?tid=5872924[
^]
http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx[
^]