How to pass int value to a ajax enabled wcf service method?

Posted by Pandiya Chendur on Stack Overflow See other posts from Stack Overflow or by Pandiya Chendur
Published on 2010-03-24T04:41:29Z Indexed on 2010/03/24 4:43 UTC
Read the original article Hit count: 148

Filed under:
|
|

I am calling an ajax enabled wcf service method from my aspx page...

<script type="text/javascript">
    function GetEmployee() {
        Service.GetEmployeeData('1','5',onGetDataSuccess);
    }
    function onGetDataSuccess(result) {
        Iteratejsondata(result)
            }
     </script>

and my method doesn't seem to get the value

[OperationContract]
public string GetEmployeeData(int currentPage,int pageSize)
    {
        DataSet dt = GetEmployeeViewData(currentPage,pageSize);
        return GetJSONString(dt.Tables[0]);
    }    

when i used a break point to see what is happening in my method currentPage has a value0x00000001 and pageSize has 0x00000005

Any suggestion what am i doing wrong....

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about AJAX