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
Solved

To stop page Refresh on click of dynamic Button

Posted on 2008-09-29
3
265 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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