That did not fix it and I think it should have so I'm now wondering if I'm
missing something else. Like once it's registered it persisted for the
session.
Maybe I need to unregester it the second time or if there is no unregister
maybe I need to register a dummy?
Any ideas?
Thanks
I included the code below
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?
Session("blnFirstTime") = True
If CBool(Session("blnFirstTime")) Then
Session("blnFirstTime") = False
Dim csname1 As String = "PopupScript"
Dim cstype As Type = Me.GetType()
Dim csm As ClientScriptManager = Page.ClientScript
If (Not csm.IsStartupScriptRegistered(cstype, csname1)) Then
Dim cstext1 As New StringBuilder()
cstext1.Append("alert('This is ")
cstext1.Append("some text.');")
csm.RegisterStartupScript(cstype, csname1, cstext1.ToString, True)
End If
End If
"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> "AAaron123" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> I think I heed a variable that has a lifetime that lasts until the user
>> leaves the site.
>
> Then use Session...
>
> Session["blnFirstTime"] = true;
>
> if ((bool)Session["blnFirstTime"] == true)
> {
> // run once
> Session["blnFirstTime"] = false;
> }
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net