Please provide a little more detail about what webform1 and webform2 do. Instead of relying on cleint side scripting being enabled, you can have your aspx page post to itself and do your checking in webform1
If Page.IsPostBack Then
Dim needToRedierect as Boolean = False
' Put code here to check to see if you need to reditrect
If needToRedirect Then
response.redirect("webform2.aspx")
End If
End If