jSon format problem RRS feed

  • Question

  • Here is my code in web api controller

            public DataTable GetLoginEmployeeInfo()
                string empID = "20160636";
                string password ="123";
                DataTable dtUserInfo = new DataTable();
                DataTable dtOprating = new DataTable();
                Hashtable ht = new Hashtable();
                ht.Add("LoginKey", empID);
                ht.Add("Passkey", password);

                dtUserInfo = DataTableByCommandFromStoredProc("GetUserByIDAndPass", ht, conCommunity);
                if (dtUserInfo.Rows.Count > 0)
                    ht.Add("EmployeeID", empID);
                    dtOprating = DataTableByCommandFromStoredProc("AOP_GetOperatingEmpID", ht, conOperating);
                    return dtOprating;

                    return dtUserInfo;


    and in WebApiConfig  i have add




    but i want

    {"EmpID":"20160636","FullName":"Delower"} in this format for my programming purpose.

    Please help me.

    Sunday, February 5, 2017 10:43 AM

All replies