one way that we needed to add our method as a webmethod, if we want to call a method from code behind at client side Write your loadInfo() Method server side in the CS file and calling it from client side using JQuery.
see below code
$("#dialog").dialog({
autoOpen: false,
modal: true,
title: "Image Full Size",
draggable: true,
resizable: false,
show: 100,
width: 900,
height: 680,
buttons:
{
"Ok": function () {
$.ajax({ type: "GET",
contenttype: "application/json; charset=utf-8",
data: "{null}",
url: "WebService1.asmx/loadInfo",
dataType:"json",
success: function(res) {
// Do something means binding data
},
error: function(err) {
alert(err);
}
});
$(this).dialog("close");
},
"Cancel": function () {
$(this).dialog("close");
}
}
});