Posted on: 9/26/2012 12:57:21 AM | Views : 227

Hi,
I have a proyect with two pages an a database, I start working on a register on page 1, then when a button is clicked I am rediredted to page 2, there I work with another register. What I want is when I hit a button, insert the new data of page 2 in the database and after that, go to page 1 holding all the info I enter before going to page 2 (just like hitting the browser back button).
I use this script in the head tags:
<script type="text/javascript">
function goBack() {
window.history.back()
}
</script>
And I trying to use this code to run it:
 If (Not ClientScript.IsStartupScriptRegistered("Back")) Then
          Page.ClientScript.RegisterClientScriptBlock _
          (Me.GetType(), "Back", "goBack();", True)
End If
If I put this code in the page_Load event of page 2 it works but inmediatly open page 2 it goes back to page 1 ...

Go to the complete details ...