• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

To stop page Refresh on click of dynamic Button

i have a dynamic(run time created) Button(creating on page load event),  but click on it causes page refresh,
I want no refresh,
any expert plz help
0
rajeev_23
Asked:
rajeev_23
1 Solution
 
informaniacCommented:
What is the button used for then?

once the button is created u could use this...

btn1.attributes.add("onclick","javascript:return false;");
0
 
KimpzorCommented:
Why do you want a server button to not postback?

remove the runat = "server" attribute or add a html button of type button instead
0
 
rajeev_23Author Commented:
This Solution really did work for me Thanks kimpzor
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now