In Page_Load I have the following wanting the popup to appear the first time
(only) that the page is displayed. I get it each time. Can this be fixed?
thanks
Static beenHere As Boolean = False
If Not beenHere Then
beenHere = True
Dim csname1 As String = "PopupScrip t"
Dim cstype As Type = Me.GetType()
Dim csm As ClientScriptMan ager = Page.ClientScri pt
If (Not csm.IsStartupSc riptRegistered( cstype, csname1)) Then
Dim cstext1 As New StringBuilder()
cstext1.Append( "alert('Thi s is ")
cstext1.Append( "some text.');")
csm.RegisterSta rtupScript(csty pe, csname1, cstext1.ToStrin g, True)
End If
End If
(only) that the page is displayed. I get it each time. Can this be fixed?
thanks
Static beenHere As Boolean = False
If Not beenHere Then
beenHere = True
Dim csname1 As String = "PopupScrip t"
Dim cstype As Type = Me.GetType()
Dim csm As ClientScriptMan ager = Page.ClientScri pt
If (Not csm.IsStartupSc riptRegistered( cstype, csname1)) Then
Dim cstext1 As New StringBuilder()
cstext1.Append( "alert('Thi s is ")
cstext1.Append( "some text.');")
csm.RegisterSta rtupScript(csty pe, csname1, cstext1.ToStrin g, True)
End If
End If
Comment