Can I prevent a Refresh on a page?

  • Thread starter Thread starter Trint Smith
  • Start date Start date
T

Trint Smith

I have a page that is on an auction site. If you refresh the page, it
doubles the bid amount someone has in a textbox...Before this site goes
live, I have to fix this.
Any help is appreciated.
Thanks,
Trint

.Net programmer
(e-mail address removed)
 
Hi Trint,

It's hard to say without more information, but it sounds as though your
code that enters the bid is in the Page_Load event. It should be in the
Click event of a button I would think. That would ensure that the code
doesn't execute unless a user really does want to process a bid.

Hope that helps.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support Engineer
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
 
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

If Me.IsPostBack <> True Then 'Put user code to initialize the page here -
when page loads for the first time

Else 'code to run when page is refreshed

End If

End Sub
 
Thanks,
This worked:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Textbox1.Text = ""

Trint
..Net programmer
(e-mail address removed)
 
Back
Top