Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This code perfectly work for below 225 rows of records only..... how can i get the record more then 225...

What I have tried:

JavaScript
function Bind_gv_eval(emp_id) {
            $.ajax({
                type: "POST",
                url: "../my_ws.asmx/Bind_gv_eval_WM",
                data: '{emp_id: "' + emp_id + '" }',
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $("#tbl_eval tr").remove();
                    $("#tbl_eval").append("DateTotalResultMGR. Remark");
                    if (data.d.length > 0) {
                        for (var i = 0; i < data.d.length; i++) {
                            $("#tbl_eval").append("" + data.d[i].date + "" + data.d[i].total + "" + data.d[i].result + "" + data.d[i].mgr_remark + "");
                        }
                    }
                    else {
                        $("#tbl_eval").append("No previous evaluation record found");
                    }

                },
                failure: function (result) {
                    alert(result.d);
                }
            });
        }


//Web Method
C#
[WebMethod]
        public eval_list[] Bind_gv_eval_WM(string emp_id)
        {
            string lang = "eng";
            if (HttpContext.Current.Request.Cookies["hrmsRiyadhFoods"]["lang"] == "Arabic")
                lang = "ar";

            SelectQuery sq = new SelectQuery();
            SqlParameter[] param = { new SqlParameter("@emp_id", SqlDbType.VarChar, 10) { Value = emp_id} ,
                                   new SqlParameter("@lang", SqlDbType.VarChar, 3) { Value =lang }
                                   };
            DataSet ds = sq.fnSelectQueryUsingStoredProc("Evaluation_Details", "hrms", param);

            List<eval_list> list = new List<eval_list>();
            foreach (DataTable table in ds.Tables)
            {
                foreach (DataRow row in table.Rows)
                {
                    eval_list lst = new eval_list();
                    lst.date = Convert.ToString(row["Date"]);
                    lst.total = Convert.ToDecimal(row["Total"]);
                    lst.result = Convert.ToString(row["Result"]);
                    lst.mgr_remark = Convert.ToString(row["MGR Remark"]);
                    list.Add(lst);
                }
            }
            return list.ToArray();
        }
Posted
Updated 12-Dec-17 19:27pm
v2

1 solution

set MaxJsonLength in ur web config file
 
Share this answer
 
Comments
Merajuddin Ansari 13-Dec-17 1:34am    
This below code solved my problem..thank you

<system.web.extensions>
<scripting>
<webservices>
<jsonSerialization maxJsonLength="819200000" />


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900