Problems with execution secuence

  • Thread starter Norberto Mesén López
  • Start date
N

Norberto Mesén López

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top