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
Who is Participating?
KimpzorConnect With a Mentor Commented:
Why do you want a server button to not postback?

remove the runat = "server" attribute or add a html button of type button instead
Obadiah ChristopherCommented:
What is the button used for then?

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

btn1.attributes.add("onclick","javascript:return false;");
rajeev_23Author Commented:
This Solution really did work for me Thanks kimpzor
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.