Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public static List<string> Getinfo(int empid)
 {

 List<string> li = new List<string>();
 .......after doing some code 
 li. add(item);
 return li;
}

if i check this code excution with break point
return li : it is again calling itself and again it starts excuting two times

i need only one time excution with retuning li


Please suggest is there any mistake ,

Thank you
Posted
Updated 2-Apr-14 21:19pm
v2
Comments
Ajith K Gatty 3-Apr-14 2:51am    
Hi
can you post your entire code of Getinfo(int empid)?
AndrewCharlz 3-Apr-14 2:54am    
where ur calling this function
Sampath Lokuge 3-Apr-14 3:19am    
Are you calling this from jquery button's click ? If so please put that code snippet also.
Member 9877910 11-Apr-14 3:57am    
Yes i am calling this method from jquery post method
Sampath Lokuge 11-Apr-14 4:09am    
Please put your code snippet of the button click ,If you need a solution ?

1 solution

I think there id problem in your code, you should update full code,

you know debugging then you only can find out issue,

HINT: Getinfo() is calling two times I Guess..

check whether debug is firing in to page load two times..
 
Share this answer
 

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