N
Norbeto Mesen
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
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