473,396 Members | 1,816 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,396 software developers and data experts.

How to click a button without re-load page ( or re-open)

Hi, All:
I am using vb.net developing web application. I am new in web application.
My issue is:

I have a button "btnCalculateTotal" on a web page (form), click this button,
the "btnCalculateTotal_Click" event will calculate the total and beside the
button there is text field will show the result. but each time when I click
the button, the page will be reload and goes to the top of the page. How
should I just click the button, do not reload(or reopen) the page and show
the result right on the text field.
Jul 21 '05 #1
4 1763
Sympony,

the load event is always executed when there is a postback

Therefore you can test the IsPostBack if that is happening in that load
event

http://msdn.microsoft.com/library/de...tbacktopic.asp

I hope this helps?

Cor
Jul 21 '05 #2
but I think for the button on_click event, it is always load the page, how
should I click the button and do not load the page?

Thanks.

"Cor Ligthert" wrote:
Sympony,

the load event is always executed when there is a postback

Therefore you can test the IsPostBack if that is happening in that load
event

http://msdn.microsoft.com/library/de...tbacktopic.asp

I hope this helps?

Cor

Jul 21 '05 #3
> but I think for the button on_click event, it is always load the page, how
should I click the button and do not load the page?

You cannot (when it is a serverside button).
(ASPNET is stateless, so when you do not load the page there is nothing)

However in the link I showed you is told how to overcome the load event.

Cor
Jul 21 '05 #4
You might consider using a client side button whose handler code is
generated form the server side using RegisterClientScript(). You can get the
clientId of the server side text box.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
but I think for the button on_click event, it is always load the page, how should I click the button and do not load the page?

You cannot (when it is a serverside button).
(ASPNET is stateless, so when you do not load the page there is nothing)

However in the link I showed you is told how to overcome the load event.

Cor

Jul 21 '05 #5

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

Similar topics

1
by: Dave Blair | last post by:
Hi, Hi, In firefox I can't get a page (which queries an SQL database and shows all the available records) to re-fresh with new updated data after a 'javascript:history.go(-4)' is used to return...
5
by: Steve | last post by:
Hi, Is it possible to make hitting the enter key in an ASP textbox run the code behind an ASP button on a form? I have a search page which users tend to type in the query then just hit enter...
4
by: Symphony | last post by:
Hi, All: I am using vb.net developing web application. I am new in web application. My issue is: I have a button "btnCalculateTotal" on a web page (form), click this button, the...
12
by: joe | last post by:
I have a Javascript page which needs to be dynamically changed depending on user input. The whole page is written on document.write() output. I am still new to Javascript and run into problems...
2
by: chadsmith76 | last post by:
Is there a way to access a string in the url with ajax and change a variable but not reload the page. I know you can do this for id's document.getElementById("page").value = page; but I...
3
by: eddie69 | last post by:
Hi, Newbie question here: I am creating an application in VB Studio 2005 which reads the status of an USB PIR Motion sensor. So far, I have managed to get the application to read the motion...
2
by: hemong | last post by:
Hi, wondering if anyone can help me I have created a form and user id, password that allows the user to submit and all this works fine however I want to create another button next to the ' > '...
3
by: sungung | last post by:
Hi group, I want to back orginal scroll postion after reload page. Is it possible? My situation is call popup windows -enter data on popup -close popup -refresh parent page -reload data. As...
2
by: Alexander Vasilevsky | last post by:
How programmatic to click the button on the page? http://www.alvas.net - Audio tools for C# and VB.Net developers
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.