I have the Jquery part for call the web method in c#
<script type="text/javascript">
$(document).ready(function () {
$('#btnLoadUserCtrl').click(function () {
var ControlName = "~/sample.ascx";
alert(ControlName);
$.ajax({
type: "POST",
url: "sample.aspx/Result",
data: "{controlName:'" + ControlName + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
alert(response);
$('#uControl').html(response);
},
failure: function (msg) {
alert("msasdas");
alert(msg);
$('#uControl').html(msg);
}
});
});
});
</script>
In this webMethod that returns the string value , After the excecution of function, it came to the success section of jquery, but returns null value..