Solved

To stop page Refresh on click of dynamic Button

Posted on 2008-09-29
3
262 Views
Last Modified: 2013-12-17
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
Comment
Question by:rajeev_23
3 Comments
 
LVL 20

Expert Comment

by:informaniac
Comment Utility
What is the button used for then?

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

btn1.attributes.add("onclick","javascript:return false;");
0
 
LVL 2

Accepted Solution

by:
Kimpzor earned 250 total points
Comment Utility
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
 

Author Closing Comment

by:rajeev_23
Comment Utility
This Solution really did work for me Thanks kimpzor
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now