All the suggested answers from other threads, which run the code on page load, which is not what I am looking for. Example: <pre>Public Class home Inherits Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load pageTitle.Text = "Builder" & System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() Dim Script As ClientScriptManager = Page.ClientScript If Not Script.IsClientScriptBlockRegistered(Me.[GetType](), "Alert") Then Script.RegisterClientScriptBlock(Me.[GetType](), "Alert", "<script type=text/javascript>alert('hi')</script>") End If End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)