Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have multiples button on one page whenever i click on button page refresh. please help me how can i prevent page refresh on button click asp.net in framework 2.0

please help...............
Posted
Comments
Prasad Avunoori 15-Sep-14 2:27am    
How many button you have? What are the functionality of each?
Member 11014751 15-Sep-14 2:54am    
Some are saving data some are getting data some are displaying controls on page on runtime .....

1 solution

1.By default the buttons in ASP.NET have AutoPostback property set on true and on each click the entire page is submitted to the web server.

2.You should change the AutoPostback property to false and to use JavaScript linked to the button OnClick event and you could use JavaScript to call actions on the server (on your code behind) by using AJAX.

3.Here are some examples:
Using jQuery for AJAX in ASP.NET[^]
http://dotnetguts.blogspot.ro/2012/01/jquery-ajax-examples-by-calling-aspnet.html[^]
 
Share this answer
 
v2
Comments
Member 11014751 15-Sep-14 2:54am    
Please give me any other example this is not working .... :(
Raul Iloc 15-Sep-14 6:29am    
See my links from my 3rd point in the solution above.

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