Page refreshes on button click.

Results 1 to 2 of 2

Thread: Page refreshes on button click.

  1. #1
    Join Date
    Dec 1969

    Default Page refreshes on button click.

    I&#039;m getting a strange refreshing of my page. It only happens when the page is first loaded and on the first click of the button. I can hear a double clicking sound when I click on the button. Here is the code for the button.<BR><BR>If Page.IsValid Then<BR>Dim eh As New ErrorIDGeneratorHandler()<BR><BR>TextBox2.Text = eh.GenerateErrorCode(DropDownList2.SelectedItem.Va lue.ToString(), DropDownList1.SelectedItem.Value.ToString(), TextBox1.Text.ToString(), DropDownList3.SelectedItem.Value)<BR><BR>eh.Dispos e()<BR>eh = Nothing<BR>End If<BR><BR>The method GenerateErrorCode() works fine as the data gets to the database its just the page refreshes back to its original state. I am displaying the IsPostBack value in a label and its false which is crap cause it is a postback it should be true. Now if you click on the button again everything works fine it submits the data, the page is not refreshed, the IsPostBack label says true, the text box displays the returned string. Why on the first click is it refreshing!?

  2. #2

    Default RE: Page refreshes on button click.

    The code you posted doesn&#039;t shyow much.<BR>Are you sure the isPostBack label is being set every time?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts