Solved

To stop page Refresh on click of dynamic Button

Posted on 2008-09-29
3
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 22596098
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
ID: 22603977
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
ID: 31501158
This Solution really did work for me Thanks kimpzor
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…

732 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