Click here to Skip to main content
15,921,467 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i click the button the page is totally refreshed i need don't require that refresh please post how to resolve the problem
Posted
Comments
pradiprenushe 12-Feb-13 3:40am    
What you are doing in button click?

 
Share this answer
 
 
Share this answer
 
If you just want the button to perform some Javascript function rather than submitting the entire form, use either:

HTML
<input id="myBtn1" class="txtUpdateContract" type="button" onclick="doFunction();" value="Click" />

or:
ASP.NET
<asp:button id="myBtn2" runat="server" onclientclick="doFunction();return false;" text="Click" usesubmitbehavior="false" />
 
Share this answer
 
v4
Remove runat="server" attribute from the button tag.

OR

Use onclientclick="MyJavascript();" to execute client side code
 
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