473,395 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Stop postback/refresh using a button...

Hello.

I'm trying to use an asp - not html - button without having a postback or a
screen refresh. I've tried turning off "CausesValidation" and
"UseSubmitBehavior" and I still get a screen refresh - which makes me think
I'm doing a postback. I've also tried "return false" in both the onclick
and OnClientClick events. No Luch. Can I use the onclick or OnClientClick
(or something else) to fire a javascritpt function and then stop?

Thanks.

Matthew Wells
Ma***********@FirstByte.net
Mar 1 '08 #1
1 3431
I found the answer myself. Make sure UseSubmitBehavior" is True. Do NOT
use OnClick as that requires a server postback. Use OnClientClick and make
sure to return 'false'. It does not have to be in a response to a "confirm"
box, just "return false;". You can do anything in between that doesn't
cause a postback.
"Matthew Wells" <Ma***********@FirstByte.netwrote in message
news:08******************************@comcast.com. ..
Hello.

I'm trying to use an asp - not html - button without having a postback or
a screen refresh. I've tried turning off "CausesValidation" and
"UseSubmitBehavior" and I still get a screen refresh - which makes me
think I'm doing a postback. I've also tried "return false" in both the
onclick and OnClientClick events. No Luch. Can I use the onclick or
OnClientClick (or something else) to fire a javascritpt function and then
stop?

Thanks.

Matthew Wells
Ma***********@FirstByte.net

Mar 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matt | last post by:
I always see the term "postback" from ASP book, but I am not sure if I fully understand the meaning. Here's my understanding so far, please correct me if any mistakes. Here's a typical html...
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
3
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish...
3
by: Tim::.. | last post by:
Can someone please tell my why I get the following problem when I type the following piece of code! How do I get around this??? The idea is that when a user clicks a button on a form it causes...
4
by: DEWright_CA | last post by:
I need to be able to from C# launch a postback. I have a command button that launches a function, I also have a javascript function that then keeps you from firing any other objects on the page,...
4
by: Coleen | last post by:
Hi All :-) I have a web page that I need to refresh every time the page loads. I thought that the page automatically did a refresh/postback on the Page_Load event. Isn't refreshing the page the...
4
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. If an ASP.NET page postsback, for example, after a button is clicked, and then I refresh the page (ie, by pressing F5 key), why does the same event occur when I press F5 as it did when I...
4
by: Dan | last post by:
Hi, i'm not sure to understand the difference between refreshing the pagina by clicking on 'refresh' in the browser and a postback. What i think it is: Suppose a page with a form containing a...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.