Click here to Skip to main content
13,628,655 members
Rate this:
 
Please Sign up or sign in to vote.
This code perfectly work for below 225 rows of records only..... how can i get the record more then 225...

What I have tried:

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
[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 12-Dec-17 18:25pm
Updated 12-Dec-17 19:27pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

set MaxJsonLength in ur web config file
  Permalink  
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web03-2016 | 2.8.180712.1 | Last Updated 13 Dec 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100