Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

i have used Ajax post to call a web method, in thAT WEB METHOD i am deleting a row in the grid, after the deletion done, i want to call the asp.net method(which is used to bind the grid)

the problem is while calling the method all of my parameters are lost that is belong to asp.net method

so anyone give me a i idea for this,

by velsamy
Posted
Comments
Thanks7872 18-Sep-14 2:44am    
" calling the method all of my parameters are lost "

What do you mean by this line?

1 solution

Hi velsamy,
Calling an asp.net method in the Web Method to bind the grid is not useful. In the service you can't access the page controls. If you want to bind the data using web method you need to do using client script either by javascript or jquery.
 
Share this answer
 
Comments
avelsamy 18-Sep-14 2:37am    
you meant that, once again i should use ajax post?
Kumarbs 18-Sep-14 2:51am    
You can't bind data in the web method, as it don't know about asp.net controls. You need to get the data from service and bind it using script.
avelsamy 18-Sep-14 4:55am    
can i have the script sample please
Kumarbs 18-Sep-14 8:55am    
You can refer
http://www.developerscode.com/2013/08/2-ways-to-bind-data-to-gridview-using.html

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