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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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
 
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.
 
Back
Top