Problems with execution secuence

Discussion in 'ASP .Net Web Controls' started by Norberto Mesén López, Oct 6, 2003.

  1. Hi, everybody


    I have a problem with the events in a web page.
    I have a botton with a method that should execute a method on mouse click
    but for some reason (that I don't know) it is executing the page_Load before
    the method call, WHY?
    What I need is that the method be called before any event and If its
    possible to cancel the Page_Load, or where else I can set this code in the
    button. This is what I have. The Page_Load always gets fired when I click
    onm btnBuscar. Any ideas.

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    If IsPostBack Then
    End If
    End Sub


    Private Sub btnBuscar_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles btnBuscar.Click
    Dim condicion As String
    condicion = ""
    PrepareCondition(Page, condicion)
    If condicion.Length <> 0 Then
    condicion = " WHERE " & condicion.Substring(4)
    End If
    Session("tcWhere") = condicion
    Response.Redirect("frmMansgrPoliza.aspx")
    End Sub

    Also I have another problem if i refresh the page with F5 function key, the
    click event on the botton always gets re-executes.


    Thanks ahead,
    Norberto
     
    Norberto Mesén López, Oct 6, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kishor

    Dynamic Execution of Function/Proc

    Kishor, Sep 24, 2003, in forum: ASP .Net
    Replies:
    9
    Views:
    564
    Kishor
    Sep 27, 2003
  2. Piotre Ugrumov
    Replies:
    1
    Views:
    504
  3. Nigel Wade

    Re: Jar execution problems

    Nigel Wade, Sep 17, 2010, in forum: Java
    Replies:
    1
    Views:
    504
    John B. Matthews
    Sep 17, 2010
  4. Replies:
    0
    Views:
    152
  5. Paul E. Schoen

    Simple script execution problems (newbie)

    Paul E. Schoen, Aug 22, 2010, in forum: Perl Misc
    Replies:
    17
    Views:
    357
    Paul E. Schoen
    Aug 25, 2010
Loading...

Share This Page