Calling page method using jquery
Hello,,
I am trying to call a page method that returns today's date time.
But i am not able to do so...
can some one help me
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#DropDownList1').change(function() {
$.ajax({
type: "POST",
url: "Default.aspx/getDate",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success:function(data){
alert(data.d);
$("#DetailsDiv").html(data.d);
}
});
});
});
</script>
The alert always shows Undefined.
Vinod