<script type="text/javascript" language="javascript">
$(document).ready(function () {
var LastRecID = 1;
$(window).scroll(function () {
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
var ImpData = document.getElementById('<%= hdnLanguage.ClientID %>').value;
if (LastRecID <= 1)
sendData();
LastRecID++;
}
});
function sendData() {
$.ajax(
{
type: "POST",
url: "try.aspx/GetData",
data: ImpData ,
contentType: "application/json; charset=utf-8",
dataType: "json",
async: "true",
cache: "true",
success: function (msg) {
$("#myDiv").append(msg.d);
},
Error: function (x, e) {
alert("err");
}
});
}
});
</script>
I am utilizing a hidden field with the same value as ImpData is set to hdnLanguage.
var ImpData = document.getElementById('<%= hdnLanguage.ClientID %>').value;
The data is being sent using JSON:
data: ImpData
I am seeking assistance on how to access this data (ImpData) in the code behind (in a static web service). Thank you for your help.