Solved

To stop page Refresh on click of dynamic Button

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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 …

777 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