Mariame,
Add a button and a label to a form and try the following code to the
buttons click event
Jared
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim urls() As String = New
String("http://www.microsoft.com,http://www.google.com,http://www.amazon.com,http://www.yahoo.com").Split(",")
Select Case Me.Label1.Text
Case 0 To 3
Me.Label1.Text += 1
Case Else
Me.Label1.Text = 0
End Select
Dim URL As String
If Me.Label1.Text >= 4 Then
Me.Label1.Text = 0
End If
URL = urls(Me.Label1.Text Mod 4)
Dim MyScript As New System.Text.StringBuilder
With MyScript
.Append("<script language=""javascript"">")
.Append("window.open('" & URL & "','Name');")
.Append("</script>")
End With
Page.RegisterStartupScript("SingleWindow", MyScript.ToString)
End Sub
"Mariame" <Ma************@yahoo.com> wrote in message
news:u6**************@TK2MSFTNGP11.phx.gbl...
Hi everyone
I have a button that open a new web page so i use the following script
response.write("<script>window.open(url,'Name')</script>")
every time the user click on the button it opens a new page
How to make sure that if the user open a page & click again on the button
it
doesent open another one as long as the page is already opened??????????
Thx & Regards