I am attempting to utilize ajax to call a C# method in the following manner.
<a href="#divrecentQ" id="linkdivrecentQ" onclick="lnkClick();" aria-controls="divrecentQ" role="tab" data-toggle="tab">Click here</a>
Below is the corresponding JavaScript method:
function lnkClick() {
alert("called");
$.ajax({
type: "POST",
url: '/amain.aspx/LoadImages',
data: {},
success: function () {
alert(1);
},
dataType: 'html'
});
alert("cal");
}
On the server side:
public static void LoadImages()
{
log.Debug("LoadImages is called");
}
Unfortunately, the server side method is not being executed.
Any assistance would be greatly appreciated.
Thank you