Same method calls 4 time almost instead of 1

Mohammad Qasim 576 Reputation points
2020-08-04T11:52:03.65+00:00

Hi,

have made this method

Problem:
its calling around 4 times on load even on button click also executed 4 times

Solution Required :instead of 1 time why its calling 4 time same mtehod or why it hits 4 time?,
as we normally call method on load or button click then its called 1 time not 4

Thanks

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,576 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-08-05T09:56:49.22+00:00

    Firstly,you need to make sure that this code has only one section in the same page.
    Secondly,you could debug the code,you could set the breakpoint in success function,you could observe the number of times the breakpoint hitted. Or you could print something that is not related to the return value,count the number of times that value appears in the console and take care of where it is in code.
    15843-result.png

    0 comments No comments