Well i have a asp.net page where i have a button that im using to execute a JavaScript... but after the JavaScript has run the page reloads(postback) how can i avoid that?
Add type="button" to your tag like so:
type="button"
Print
This answer explains the behavior.