Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am currently migration from asp.net to asp.net core. As i am going on with it i have an issue where my field search which is a feature is not working. (It hits to the break point but then does not fetch the data from the json result.)

Please help me with this issue.

What I have tried:

public JsonResult GetFieldByName(string searchText)
        {
            Share.Log("Dec field Controller -> GetFieldByName -> Start");
            bool isSuccess = false;
            List<hk_field> fieldList = new List<hk_field>();
            string message = string.Empty;
            try
            {
                fieldList = _adapter.GetFieldsByName(searchText);
                isSuccess = true;
            }
            catch (Exception ex)
            {
                Share.Log("Dec field Controller -> GetFieldByName -> " + ex.Message, Share.MESSAGE_TYPE_ERROR);
                message = ex.Message;
            }
            Share.Log("Dec field Controller -> GetFieldByName -> End");
            return Json(new { type = StatusType.Success.ToDescription(), message = message.ToString(), isSuccess = isSuccess, data = fieldList });
        }
Posted
Comments
F-ES Sitecore 19-Jun-20 7:15am    
I imagine the problem is in _adapter.GetFieldsByName which you haven't shown the code for so there isn't much we can help with.

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