473,320 Members | 1,922 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,320 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 1760
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.