Is it possible to to call a javascript function from code behind?
What I have tried:
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